One 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…
All the JetBrains IDE's keep a history of your edits, I accidentally rm -rf'd the wrong dir and reverted my code back thanks to JetBrains. I can't imagine vim saving your old files that have yet to be checked in to SVN / git (breaking changes anyone?) that you've not yet opened on vim. 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 someth…
Ten Years of Vim
81–90 of 123 posts
Re: Ten Years of Vim
#82Earlier quoted context omitted.
Most of those are plain vi ( and ed ) commands. All of my machines have the vim-tiny package to stay as close to stock vi as possible. I open and close the editor dozens of times a day to make simple changes and I don't tolerate any lag. I can see that vim would be great for long-form programming but plain old vi was just fine for most admin tasks.
Okay, so I've come across `vim.tiny` a few times now, what's the difference? Plain `vi` I can't seem to work out, the shortcuts I usually use all seem to be different?
Re: Ten Years of Vim
#83Earlier quoted context omitted.
I have been noticing this effect as well, and I was thinking that there needs to be a change in how we design programming languages. The old programming languages are treating characters or words as atomic units, but human mind does not really work at words. We work at sentences or lines. Each line can have its own context and can host more flexible syntax. On one hand, the programming languages can be more expressiv…
Lisp?
Re: Ten Years of Vim
#84Re: Ten Years of Vim
#85Earlier quoted context omitted.
All the JetBrains IDE's keep a history of your edits, I accidentally rm -rf'd the wrong dir and reverted my code back thanks to JetBrains. I can't imagine vim saving your old files that have yet to be checked in to SVN / git (breaking changes anyone?) that you've not yet opened on vim. 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 someth…
Vim also has persistent undo. Check out the options: undofile undodir These will cause vim to store all file histories into files within that directory. Now you can close and reopen vim and continue undoing as much as you want!
Re: Ten Years of Vim
#86> 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.
I don't see why that means he's not a touch typist? I actually use both hjkl and the arrow keys. Arrow keys are useful for moving the cursor in insert mode.
Re: Ten Years of Vim
#87Earlier quoted context omitted.
Emacs + evil-mode, presumably. :)
I need to use Emacs rather than vim for some things (Proof General, mostly), and I was surprised how well evil-mode works. It's only undo that I don't get. From vim I'm used to be able to undo as many editing steps as I want. In evil-mode, I find that if I type "u" too many times, it runs out of undos to do and starts undoing the undos (i.e., it starts re doing things I want to go away). Also, search uses different w…
https://www.emacswiki.org/emacs/UndoTree
Regarding "_", you can set up Emacs to treat _ as word constituent by modifying the syntax table. For example:
(modify-syntax-entry ?_ "w")
For more information, please see:https://www.gnu.org/software/emacs/manual/html_node/elisp/Sy...
Re: Ten Years of Vim
#88I know you said that you like maintaining a super minimal .vimrc, but fwiw there's a couple of plugins that really helped me with the workflow issues you mentioned struggling with: > Jumping around in longer texts: I know the basics, like searching (/), jumping to a matching bracket (%) or jumping to specific lines (for line 10, type 10G), but I still could use symbols more often for navigation. vim-sneak is real nic…
OP here. Thanks for the tips. I've used vim-sneak for quite a while (it's even built into Visual Studio Code's Vim plugin), but it just didn't work with me. I'm more of an easymotion ( https://github.com/easymotion/vim-easymotion ) type of guy. But even easymotion vanished from my workflow, because `/` works almost equally well for me and easymotion is not available on every system I use. I guess what I'm trying to s…
It allows you to repeatedly 'v' to select ever larger parts of text.
Re: Ten Years of Vim
#89I know you said that you like maintaining a super minimal .vimrc, but fwiw there's a couple of plugins that really helped me with the workflow issues you mentioned struggling with: > Jumping around in longer texts: I know the basics, like searching (/), jumping to a matching bracket (%) or jumping to specific lines (for line 10, type 10G), but I still could use symbols more often for navigation. vim-sneak is real nic…
OP here. Thanks for the tips. I've used vim-sneak for quite a while (it's even built into Visual Studio Code's Vim plugin), but it just didn't work with me. I'm more of an easymotion ( https://github.com/easymotion/vim-easymotion ) type of guy. But even easymotion vanished from my workflow, because `/` works almost equally well for me and easymotion is not available on every system I use. I guess what I'm trying to s…
Re: Ten Years of Vim
#90> 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.
I don't see why that means he's not a touch typist? I actually use both hjkl and the arrow keys. Arrow keys are useful for moving the cursor in insert mode.
Touch typists are more comfortable with using hjkl than the arrow keys as the hjkl keys reside in the home row; so they are extremely cheaper to press than the arrow keys for touch typists.
And, you don't need to move the cursor in insert mode. vim and more generally the modal editing concept is invented just so you don't do that. I'm not sure if you are a rookie vim user or have a niche use case that requires moving the cursor in the insert mode.
I think it is funny that vim supports arrow keys at all. It's probably to reach a wider audience, and for compatibility. And a related fact is that the original vi doesn't support using arrow keys in insert mode in the way you expect.