You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I wanted to replace "darkman" with "direnv", in Vim I would just place my cursor on the word "darkman", press <C-n><C-n> to select both instances of "darkman", then press c to replace the word and enter insert mode, then type "direnv". Super quick and easy. (Though, to be clear, this is using the vim-visual-multi plugin, this is not built-in Vim functionality.)
Without multiple selections, this becomes a lot more tedious, especially when I have to repeat it a bunch of times for several different symlinks.
To summarize the feature request:
Problem: Replacing many instances of the same text on a line is tedious
Solution in Vim/Neovim: A multi-select plugin
Solution in zsh-vi-mode: ?
Possible solutions:
Add multiple cursors to zsh-vi-mode (drawback: extremely complicated)
Add limited support for multiple selections
Make a visual selection, then press a keybinding to also select the next instance of the selected text
Also needs a keybinding to skip the current selection and jump to the next one
Allow pressing d or x to delete the selection and leave multi-select mode, or press c to replace the selections and insert some new text, I to enter insert mode at the start of every selection or A to enter insert mode at the end of every selection
Simpler than full-blown multi-cursor mode, still massively powerful
Add a "replace all" keybinding
The user selects a span of text
Presses a keybinding called something "replace all"
This deletes the selected text and enters insert mode
When leaving insert mode, all the other instances of the selected text on the same line is also replaced
Much, much simpler than the above solutions, still solves the issue
The text was updated successfully, but these errors were encountered:
(This is not a bug report, so I'm not following the standard template)
First of all, let me say that zsh-vi-mode is amazing, I'm certain it's the best Vi-mode plugin for any shell that exists.
However I have encountered one pretty common scenario that I would easily be able to resolve inside Vim, but is more challenging in zsh-vi-mode.
If I have a line like:
If I wanted to replace "darkman" with "direnv", in Vim I would just place my cursor on the word "darkman", press
<C-n><C-n>
to select both instances of "darkman", then pressc
to replace the word and enter insert mode, then type "direnv". Super quick and easy. (Though, to be clear, this is using thevim-visual-multi
plugin, this is not built-in Vim functionality.)Without multiple selections, this becomes a lot more tedious, especially when I have to repeat it a bunch of times for several different symlinks.
To summarize the feature request:
Problem: Replacing many instances of the same text on a line is tedious
Solution in Vim/Neovim: A multi-select plugin
Solution in zsh-vi-mode: ?
Possible solutions:
d
orx
to delete the selection and leave multi-select mode, or pressc
to replace the selections and insert some new text,I
to enter insert mode at the start of every selection orA
to enter insert mode at the end of every selectionThe text was updated successfully, but these errors were encountered: