Basically, undo trees can be persisted across vim sessions. Have a read via ":help undo-persistence".
Ten Years of Vim
21–30 of 123 posts
Re: Ten Years of Vim
#22Regarding tabs: I bound F2 to previous tab, F3 to next tab and F4 to new tab. Besides highlighting the current line, I think this is my most important customisation.
Isn't `gt` and `gT` faster? You don't have to move your hands!
Re: Ten Years of Vim
#23With Vim you could split a tab with a frontend HTML and CSS file, and have a couple of backend files in another tab. Then `gt` or `gT` to switch between the groups.
If you use nerdtree, `t` opens a file in a new tab, so you don't need to type `:tabnew` often.
Re: Ten Years of Vim
#24Re: Ten Years of Vim
#25Surprised to see that he's gone back to an empty vimrc after years with high customization. To me customization is such a great part of vim that I can't imagine being without it. For instance, I have shortcuts to find and replace on visual selection. I also have at least 5 plugins in my vimrc that are absolutely necessary for my workflow. Pure vim is nice if you need to occasionally edit files, but if you use it as y…
Re: Ten Years of Vim
#26One thing google can do that blows most peoples mind when I show them: Did you know vim supports time travel undo? Sometimes you do some things then undo and redo trying to get back to a certain point in time. In vim you can step forward and back through all this by doing "g-" or "g+" to travel backwards or forwards in time. Or you can say ":earlier 50s" to go back to where you were 50 seconds ago. Most editors treat…
Funny you mention that though, a coworker opens files in vim and does changes and tests but keeps it open if he's going to try something else so he can always go back to those other changes (guessing he reverts the code, then opens yet another vim window). I work with a lot of VI(M) coders but they barely take full advantage of VI(M). I just use IDE's or Emacs / VS Code (w/ X Forwarding more recently) personally makes it easier to find the fancy features with a UI.
I'll share that time travel feature to my VIM coworkers maybe it'll save their tail sometime.
Re: Ten Years of Vim
#27One thing google can do that blows most peoples mind when I show them: Did you know vim supports time travel undo? Sometimes you do some things then undo and redo trying to get back to a certain point in time. In vim you can step forward and back through all this by doing "g-" or "g+" to travel backwards or forwards in time. Or you can say ":earlier 50s" to go back to where you were 50 seconds ago. Most editors treat…
Re: Ten Years of Vim
#28Sounds like he's not a touch-typist.
And as a general note; learning and mastering vim can hardly be a pleasant activity for non touch-typists, or otherwise typing heroes.
Re: Ten Years of Vim
#29All of the points in the "Some things I wish I could do better" section are the reason I use a regular memorization free-ish IDE. Out of the box the things I want to do are easy (multiple files, manipulating structure of blocks of text, searching and manipulating information across my project simultaneously) and the things that aren't are rare (Add a dollar sign at the beginning of the next 13 lines). I know how to u…
Easy what? Easy to learn or easy to do?
They are arguably easier to do in vim once you learn the proper method. Just not as easy to learn.
That a common trade-off shared by rather elaborate tools.
Re: Ten Years of Vim
#30> I don't use arrow keys to move around in text anymore but forced myself to use h, j, k, l. Many people say that this is faster. After trying this for a few years, I don't think that is true (at least for me). I now just stick to it out of habit. Sounds like he's not a touch-typist. And as a general note; learning and mastering vim can hardly be a pleasant activity for non touch-typists, or otherwise typing heroes.