|
|
|
|
|
by dreamer7
2049 days ago
|
|
Ya that would be really helpful. I've picked up bits and pieces of vim over the years. Recently, I even installed vimium on Chrome and the vim extension for VS Code in an attempt to get better at it. It has been quite effortless to delete or replace words or lines but every time I've tried getting more adventurous with it - say, surround every line of text with double quotes etc, I end up finding the commands unintuitive or hard to remember. There's also an issue with my older muscle memory of `CMD+Z` which works on a different stack than `u` and `CTRL+R` and I end up messing up my code. |
|
It’s worth noting that u and ctrl-r don’t operate on an undo stack but on an undo tree.
So if you have a series of edits and undo them all then do something else you can still get back to where you were before.
Use g+ and g- to walk the tree and the Gundo plugin is gives you a nice visual diff interface.
So having a separate shortcut and “stack” is actually a great feature of Vim IMHO.