3 ms·
First you'll learn how to orientate around text quickly using normal mode, then you'll start playing with tabs, splits and buffers to search between multiple fi
by cm127 12y ago
First you'll learn how to orientate around text quickly using normal mode, then you'll start playing with tabs, splits and buffers to search between multiple files, and then you'll start using registers to save phrases and regular expressions to search directories. At that point you'll never want to leave Vim again.
:wq
- beaumartinez 12y ago:x (It's the same as :wq, but one character shorter.)
- philsnow 12y agoEven shorter: ZZ "Shift z z" is one key shorter than "shift colon x enter"
- virtualwhys 12y agoColon? That sounds painful, map it to some single keystroke. I use back slash on my tiny cherry keyboard. noremap \ :
- philsnow 12y agoIsn't backslash the default <leader> keystroke?
- virtualwhys 12y agoyep, have leader mapped to space ;-)
- Xcore 12y agoNo it is not the same. x only writes if not already written.
- virtualwhys 12y ago> then you'll start playing with tabs, splits and buffers I want to like vim's window management but it's pretty quirky, at times it seems to be following the principle of most surprise. Ideally one could use tabs (that aren't renamed to the buffer name when populating a named tab), splits, and buffers together in such a way that one's layout never, for example, collapses, leaving a single displayed buffer and N hidden ones, or a buffer getting cloned across 2 splits (the latter is pretty disorienting, unless I'm diff'ing versions of a file I don't ever want to see 2 versions of the code consuming visible screen area). Granted am only 3 days into the vim WM experiment here, lot's to learn...
- swah 12y agoMultiple files is exactly where Vim falls short to me. Sublime and Emacs do that much better, while in Vim it never feels natural. It seems the Vi-way is to exit, and start a new one from the terminal (which is slow for most projects but great for editing /etc/hosts).