question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request Plugin Addition: vim-abolish by tpope

See original GitHub issue

Subvert and the coercion operators are some of my most used features in vim. I can’t believe no-one has suggested it yet!?

Abolish may be a difficult thing to emulate, since it adds iabbrev commands to the .vimrc. But, the subvert substitution and the coercion operations are 🔥

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:24
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
endowdlycommented, Feb 22, 2020

@vegerot I think there are a couple more issues besides the lack of manpower:

  • tpope wrote amazingly well-crafted plugins, but they are often incredibly complex
  • vimscript cannot be directly ported to TS/JS, so there will always have to be a herculean refactor
  • The other issue is the way vsvim has to tie into the vs code editor–it makes it very difficult to pull off some of the tricks vim can easily do

Because the editor is essentially a web-page, the plugin has to do a couple things: maintain a mode state, action state, and record inputs. There’s only so many combinations of states and inputs we can do at any given time, and some vim plugins just can’t play together well without removing a standard movement or action. ¯\_(ツ)_/¯

That said, I do think abolish is possible to emulate (closely) in its entirety:

  1. Abolish can write and read from an additional json file that would mimic the vimrc and store the abolish list. The then VsVim could just do a constant text search for those words when in insert mode and change them when they are complete.
  2. Subvert is just an expanded regex find&replace. This is probably the low hanging fruit because it can be placed in the command palette and accessed by the ex command mode like the other commands.
  3. Coerce is tricky as I mentioned before. The easiest way would be to do something like Sneak/EasyMotion does now or utilize difference key modifiers. Coerce would also need a similar hack like how Surround is implemented. This would be the highest difficulty addition.

If I had more time!

3reactions
J-Fieldscommented, Feb 20, 2020

@vegerot Generally because there’s only so much we can do in our free time. Pull requests are always welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vim Magic with Abolish.vim - Hashrocket
The creator Tim Pope describes Abolish.vim as follows: It's three superficially unrelated plugins in one that share a common theme: working with ...
Read more >
Preview for vim-abolish? : r/neovim - Reddit
tpope /vim-abolish provides a useful :Subvert command that works like a smart substitution. Is it possible to preview the command's effects ...
Read more >
Advanced filtering utilities in Vim - » Linux Magazine
Vim-abolish is installed by downloading the plugin from its homepage [1] to ~/.vim or ... cd ~/.vim/bundle git clone git://github.com/tpope/vim-abolish.git.
Read more >
Vim plugins - The Blue Book
Add the plugin and configure it so vim runs it each time you save. ... Error adding elipsis instead of three dots: Pope...
Read more >
Vim for Writers - NaperWriMo Wiki
vim is a very powerful modal text editor with a large system of plugins. ... writing things Plug 'tpope/vim-abolish' " Fancy abbreviation replacements...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found