> Your problem with Vim is that you don't grok vi.
http://stackoverflow.com/questions/1218390/what-is-your-most...
ed is a line editor based on search-and-replace using regular expressions. To edit existing text, you typically locate it with a search and change it with a replace. Sometimes you refer to nearby lines with .±n addressing, and sometimes by absolute line number (having printed a few lines with the ‘n’ command); and sometimes you change entire lines (with ‘c') rather than doing a replacement; but really, search-and-replace is where it's at. vi's line mode, which you enter with ‘Q’ or more commonly one-off with ‘:', is just ed on steroids.
TECO is a character stream oriented editor, or, if you prefer, a programming language for manipulating streams of text. http://scientopia.org/blogs/goodmath/2010/11/30/the-glorious... is a decent short introduction. TECO text manipulation functions have an optional count, a function name (one or two characters), and an optional argument terminated by ESC. That should already look familiar; vi's visual mode is watered-down TECO. Sure, many of the functions have different names — vim's ‘h’ and ‘l’ are TECO's ‘r’ and ‘c’ — but some are the same: ‘i’ followed by an argument (i.e. some text) terminated by ESC is the function that inserts its argument before the current editing point. It's counterproductive to think of vi as having an ‘insert mode’ and ‘append mode’ and ‘replace mode’ and ‘substitute mode’ and whatnot, just as it would be conterproductive to think of the x in sin(x)² + cos(x)² as being in ‘sine mode’ or ‘cosine mode’.
Spend an hour with ed and an hour with TECO, and you'll begin to grok vi.
A: for use within vim (where "i" has another meaning already), or
B: for people who have a long history using vim and are already used to the hjkl paradigm, or
C: (most often) both.
I'm really not sure why you would get tired of this "obsession." No one is telling you to use hjkl unless you're using vim.
It's annoying when you spot this kind of thing about 6 times a year. FWIW today I also spotted a story about how you shouldn't be using hjkl.
Upsides: - ijkl is easier for users learning vim. - don't have to shift your fingers over to h key
Downsides - rebind insert to h (not really a big deal) - middle finger is now responsible for up and down (I honestly don't see this having much effect on efficiency)
I'm tempted to try this, but I hate the feeling of not being familiar with a vanilla config. What if I have to use somebody else's machine?
The same goes for hkjl. The arrow keys are too far away, that's why you use hkjl. Embrace the lazy and you'll grok vim.
The #1 trick is to swap control and caps lock. The #2 trick is to use control-[
- use the caps lock as escape
- use the space bar as escape
- map jk or jj as escape
I've personally been using the escape key itself for so long it doesn't bother me. I no longer even notice that it's any further for me to reach than other keys, so I have no reason to switch. And that leaves all those other keys I mentioned above for other purposes. For instance, I've mapped the space bar to : Now if only I could remember to use it.
http://upload.wikimedia.org/wikipedia/commons/3/36/KB_German...
http://webcache.googleusercontent.com/search?q=cache:h6o6.co...
Alt+character is the same as Esc followed by character if you want to speed up your escaping without using a non-standard keyboard layout.
I know I can bind it, but the thought of rebinding every command and then being dependent on towing the configuration to every computer I'd ever use scares me.
So I use it on occasion with the same artfulness as someone on crutches trying to dance.
Maybe someday someone will default an 'FPS' control layout.
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
It's extremely painful for the first day or two, but it's worth it. (Starting on a weekend might be a good idea.)After a few days when you are confortable with it. Start using hl for side arrows.
I did it like that.
i went through the same pains. the worst was copy and paste. what a pain! but in a week or two it will become mostly natural.
I am not even close to being able to do this yet, but I keep reminding myself to use other movement commands and search instead. Eventually it will be faster.