First Missing Feature:
https://www.linux.com/learn/vim-tips-basics-search-and-replace
Range for vim search and replace does not work.
The following work in Vim for VSCode:
:%s/Search/Replace/g //globally search and replace entire doc
:s/Search/Replace //search and replace first instance of Search on this line
:s/Search/Replace/g //search and replace globally on this line
The following doesn't work in Vim for VSCode (Missing Behavior):
:[range] s/Search/Replace/ //search and replace first instance of Search on lines in range
:[range] s/Search/Replace/g //search and replace globally for lines in range
where range is of the format
:1,3 s/Search/Replace/g //search and replace every instance of Search on lines 1, 2, 3
Second Missing Feature/Behavior:
http://vim.wikia.com/wiki/Repeat_last_colon_command
Repeating previous colon command is not working.
@: //repeat previous colon command
@@ //repeat previous repeated colon command
The first one works with neovim integration, the second one just hasn't been implemented.
What neovim integration? How do I get it and make it work? Is it an addon or an additional plugin?
https://github.com/VSCodeVim/Vim#neovim-integration
I can't install an external application that isn't on the approved software list. Regular Vim and newvim are both not on that list, so it doesn't and won't and can't work for me. I can install packages for visual studio code all day. It doesn't work in Vim for VSCode organically, and it should. Search and replace works most of the way, just need to make it work over a range instead of over a whole file.
For the second, a couple of related issues: #1775, #2617. There are also a few commands - &, :s, :& (synonyms, repeat last substitution without flags) and :&& (repeat last substitution with flags) that would be easy to add if command history was accessible.
@parkovski Perhaps of interest, @kamikazeZirou just did the work to add command line history. https://github.com/VSCodeVim/Vim/pull/2618
@Chillee that merge has helped, but I'm glad you've kept this issue open and separate, because the :s shorthands are one of the very few things I'm missing from vim :)...
So I just wanna mention a few things:
If there's anything I'm missing, lmk.
Would you welcome a PR from someone new to this project? That PR you referenced looks like it would be very helpful to lead me in the right direction, and the time these features would save me would warrant the effort ;).
+1 for the & command. I'm in the same boat as carkat where installing NeoVim on my work computer would be a non-starter. & seems pretty straightforward to implement.
(Edit: I see that :s now works...can we get & added as a synonym?)
I was gravely missing & too as my search and replace workflow usually involves running s/foo/bar/ followed by hopping around matches with n and reapplying the replace with &.
I found you can enable & with a simple config:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["&"],
"commands": [":s"]
}
]
Would this ticket cover Vim's :g/foo/s//bar/g syntax also or is that a different/new ticket?
Would this ticket cover Vim's
:g/foo/s//bar/gsyntax also or is that a different/new ticket?
sorry to re activate this thread.
i wanted to known the evolution of :g support in vscodeVim, i found the lack of it was disturbing, as i have to have another vim window with the file to do some command.
thanks
@mirsella I opened #4773 about this if you want to subscribe there.