by bw2 on 3/2/13, 12:03 AM with 38 comments
by ominous_prime on 3/2/13, 3:21 AM
> Your problem with Vim is that you don't grok vi.
http://stackoverflow.com/questions/1218390/what-is-your-most...
by kps on 3/2/13, 3:47 AM
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.
by cdash on 3/2/13, 1:17 AM
by snarfy on 3/2/13, 2:29 AM
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.
by a_p on 3/2/13, 1:25 AM
by whatshisface on 3/2/13, 1:01 AM
http://webcache.googleusercontent.com/search?q=cache:h6o6.co...
by mortehu on 3/2/13, 4:02 AM
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.
by armored_mammal on 3/2/13, 3:06 AM
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.
by CoffeeDregs on 3/2/13, 2:11 AM
by bcl on 3/2/13, 5:02 AM
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.