5 ms·
Here are some more tips: - disable arrow keys - turn relative numbers on by default - force yourself to only move vertically using relative numbers - f
by alfiedotwtf 12y ago
Here are some more tips:
- disable arrow keys
- turn relative numbers on by default
- force yourself to only move vertically using relative numbers
- force yourself to only move horizontally using [fF,;]
- delongshot 12y agoGood tips! You just reminded me that I did both of those first two at first as well. Arrows especially. But those last two are good too! I'll have to add them into my workflow.
- madeofpalk 12y agoWhy would you want to disable arrow keys?
- beaumartinez 12y agoTo to keep your fingers on the home row, in order to have better access to all the other keys in your keyboard. Having your fingers on the arrow keys mean your hand has to travel that much further to type the other keys—making you slower.
- Syssiphus 12y agoIt's not so much about speed. It's about comfort.
- AlexeyBrin 12y agoI've always wondered if the "disable the arrow key" advice given to every VIM novice makes any sense for the user of a 11" - 13" laptop. It was probably a good advice for a classical keyboard, but I find the arrow keys quite handy when I work on a small laptop keyboard.
- Morgawr 12y agoI started seriously using vim around the time I started coding on the go with a very old eeePC (the first model, the absurdly small one). This was around 5-6 years ago probably. Back then I had already used vim before but only as a "normal" text editor, just go into insert mode and move around with arrows. I was forced to use vim because that old piece of crap PC (I still love it though) wasn't powerful enough to run anything, really, and the screen was super small. I noticed using arrows key was super uncomfortable because yes, they were closer to the actual home row but they were also smaller, clunkier and harder to press. So I decided to force myself to use hjkl and disable arrow keys. It was definitely one of the best decisions of my (coding) life. Just comfortably resting your hands on the home row (either laptop keyboard or normal one) simply makes your typing more relaxed and after the couple of weeks (months?) struggling with left/right (up and down was fairly easy) you really stop noticing it. Funnily enough, I re-enabled arrow keys a year or so ago and I haven't really felt the temptation to use them anymore. DISCLAIMER: This turned me into a super slow and awkward typist when I am trying to work on text in an editor that does not support vim mode (like google docs for example). I have several documents around with jjjkkjhjjhjjllljh unfortunately.
- deleted 12y ago[deleted]
- throw_away 12y agoI would argue that it's best to disable arrow keys in insert mode only. This is the real problem here. By using arrow keys in insert mode, the novice ends up using vim just like a glorified notepad, and never truly understanding the different modes. Since they aren't ever going back to command mode, they never consider using more advanced movement operators, and then they never realize the power of composing motions and commands. Whenever I start teaching someone vim, I always add this to their .vimrc: inoremap <Left> <nop> inoremap <Right> <nop> inoremap <Up> <nop> inoremap <Down> <nop> This way, arrows still work as expected in command mode, but not in insert mode. The novice will learn to only insert in insert mode, and move and operate in command mode.
- beaumartinez 12y agoGood tips. Getting in the habit of explicitly searching (/) instead of scrolling is another one. On the subject of using fFtT (and other motions), there's a plugin I quite like that works well with my mental model of that motion—I often don't want to go to the first instance of that character, but the second or third in that line. EasyMotion[1] lets you do that. [1] https://github.com/Lokaltog/vim-easymotion https://github.com/Lokaltog/vim-easymotion
- tomjakubowski 12y ago> - force yourself to only move vertically using relative numbers > - force yourself to only move horizontally using [fF,;] These tips doesn't strike me as helpful. The w, b, e et al. (word boundary); % (paired delimiters); /, ? (occurrence); ^, $ (begin/end of line); and text object motions are indispensable to a Vimmer, and I use them all far more than I use [fF,;]. / and ? are more useful to me than f/F because it's often easier and faster to include another character or two of unique context for a character than to count occurrences beforehand or tap ; a bunch of times and they also work across multiple lines. I'm finally learning and remembering to use marks which are another great way to navigate a buffer or even several buffers at once.
- mmahemoff 12y ago- disable arrow keys - force yourself ... - force yourself ... This strikes me as an attitude that drives people away from Vim. Maybe it depends on individual differences in learning style, but I would say the exact opposite. Embrace the arrow keys! And all else that is familiar. The moment you start with Vim you're diving in the deep end and productivity will take a plunge. At least training wheels like the arrow keys can help you stay productive and keep using it for long enough until you cross over the productivity threshold (where you're more productive than on a normal editor, even though you still have a lot more learning to do).
- raverbashing 12y agoArrows are just another way of jumping, this is not Unix VI, this is VIM It's an editor, it should be as easy as possible. People (should) use VIM because it's powerful, not because it's different from other editors.
- IE6 12y agoAgreed - I use vim heavily and also use arrow keys (when I can) and when they do not work for whatever reason i fall back to HJKL. For me my main blocker was just purely not being able to use it for the absolute basic operations. I found that once I learned how to do the absolute basic (insert, copy, paste, move around, search, etc.) I was able to use vim. The next step was building my own vimrc with some very basic configurations that made vim much easier to use. Then whenever I need or want to do something complicated I just google for the command, plugin, or write my own plugin.
- Supermighty 12y agoI think disabling the arrow keys is a mistake for someone just coming to vim. The arrow keys can act as a warm blanket of familiarity while learning the harsh winter of vim. When a noob is making mistakes and getting frustrated having the arrow keys work like normal is a comforting reprieve. Once someone has a couple of months of vim under their belt then would I recommend disabling the arrow keys.