5 ms·
This is reasonably fast, but not nearly as fast as if can be on Vim. IDK how GP did it, but one quick way might be searching for strings and hitting . whenever
by read_if_gay_ 6y ago
This is reasonably fast, but not nearly as fast as if can be on Vim. IDK how GP did it, but one quick way might be searching for strings and hitting . whenever the macro needs to be applied. So you would end up doing something like n n n . n n . n n and so on, where each n means “go to next string” and each dot corresponds to finding and renaming something manually in other editors. You can go through dozens of occurrences in seconds, orders of magnitude faster than other editors.
- allannienhuis 6y agoThe vscode rename is much simpler/faster than that - cursor over the symbol/variable, press F2, type in the new name, press enter. Renames all references across all files in your project. edit: no shade on VIM and VIM macros; they're great. I'm a very experienced vim power user, but have switched to vscode with vim keybindings, and I'm very very happy with the switch.
- xfer 6y agoYou're conveniently forgetting that this works for only supported languages. These things are also possible in vim with additional plugin for your language.
- read_if_gay_ 6y agoThis is true for renaming a variable but GP mentioned converting string literals to enums. For tasks like that, I think Vim is pretty much the fastest. Also, Vim can also rename variables with coc (https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim)