4 ms·
Vim is very easy, I think it's just simple to get overwhelmed with it. There are a couple of tools which gamify Vim. I personally haven't used them. But some
by ifoundthetao 10y ago
Vim is very easy, I think it's just simple to get overwhelmed with it.
There are a couple of tools which gamify Vim. I personally haven't used them. But some say they're pretty good.
For me, what worked was just jumping in and going whole hog. I tried disabling the arrow keys in Normal Mode, so I would have to use hjkl for navigation. But my keyboard puts the arrow keys in easy reach (Kinesis Advantage), so it turned out not to be much of a need.
What you may like is turning on relative line numbers. That way you can visually see what line you're at, and how many lines away your target is that want to jump to. Then you can practice going 5k to go up five lines, or d2j, to from where you are to two lines down.
This article was actually eye-opening for me: https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d#.n1xc3qjkg https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-m...
Maybe it'll help you too.
:wq
- jon_richards 10y agoWhy do people not like :x ?
- travv0 10y ago:wq is a natural extension of :w, and half the time I haven't even decided to quit Vim until I've already typed the :w.
- jedberg 10y agoIt's an extra thing to remember. When I'm coding I usually just do :w, so when I'm editing config files I do :wq because it's the same thing (write the file) plus a new action (quit) in my head, instead of a totally different action (save and quit)
- chongli 10y agoThere's also ZZ which I find easiest of all.
- deleted 10y ago[deleted]
- bgribble 10y agoI wrote a shell toy to help me learn vim motions.. the idea is you can grab parts of the output of previous shell commands by passing vim motions. So like when you want to say "git checkout <that branch mentioned 5 lines up in the previous command's output>" you can do it :) git checkout $(lw 5kyiW) It's more of a toy than a power tool but I do use it somewhat regularly. https://github.com/bgribble/lw https://github.com/bgribble/lw
- ifoundthetao 10y agoInteresting, you may be interested in vi mode in bash. http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/ http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-shee...
- amboar 10y agoFor bash or any other application using the readline library you can configure it for vi mode by adding 'set editing-mode vi' to your ~/.inputrc. Note for bash you can instead add 'set -o vi' to ~/.bashrc to avoid setting the mode for all readline applications