From guckes@guckes.net Wed Feb 13 04:59:54 2008 Date: Wed, 13 Feb 2008 04:59:54 +0100 From: Sven Guckes To: ruth wolff Cc: Franz Lax Subject: Re: vim - powerful commands - esp touch typers Message-ID: <20080213035954.GA4669@guckes.net> References: <20080211215015.GE20409@minos.sil.at> <20080212020400.GB14099@guckes.net> <11ce7b090802121212q7d1ba2aaw7d3d266c42ae0fb2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11ce7b090802121212q7d1ba2aaw7d3d266c42ae0fb2@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Status: RO Content-Length: 4026 Lines: 130 Hello, Ruth! (and Franz, too!:) * Vera Ruth Wolff [2008-02-12 22:25]: > > seriously, Ruth - the mails you send look, well, > > suboptimal. there is room for improvement! > > and vim is quite the tool for text editing. > > once you get to learn those two tools > > email feels like a breeze... zooooom! :-) > > give it a try! Franz can teach you! > > You're the first one out of my myriad of email > contacts that is dissatisfied with my email style. yeah, i get this every now and then. but only from people i care about. you see, people i dont care about do not get any feedback from me. > Actually, it drives me nuts to have to try to > find out if somewhere in the email I wrote, > there is a reaction from the other side. and have you ever wondered *why* that is? ;-) you see, we use context driven replies, ie you see the response directly where the context is. much easier to follow. > Franz is always welcome to teach me whatever > he wants, but preferrably not typing! :) wait... this is *not* about typing" as in "where is the key - and which finger do i need to use to press it". this is about a new meaning to keys according to *mode*. you see, the vim editor has a different approach for typing - namelu *modes*! in "insert mode" all the characters are simpy inserted - exept "escape". easy. however, hitting "esc" ends insert mode and returns you to "command mode". and now all keys are *commands*. "you now enter the world of *vi*.. omm..." this means that normal letters are commands. for example, "hjkl" are to move the cursor left, down, up, and right, respectively. sure - there are cursor keys, too, but they are *somewhere* on the keyboard. they are not on the "home row", right? there are many more commands to move the cursor, eg "find next letter X" - "fX" junps right onto 'X'. you can jump by words, sentences, or paragraphs. the capital letters H, M, and L move the cursor to the Home position (upper left), Middle row, and Last position (last line), respectively. and now comes another new thing: you can *combine* these "jump commands" with 'd' (delete) and 'y' (yank, copY). example: hit 'd' to say "delete ..." - and the use a command that moves the cursor, eg 'w' which jumps nto the next beginning of a word. the text in betweeen the current position and the ending position of the cursor is then deleted. so the command "dw" deletes the text up to the beginning of the next word. sounds complicated? well, it isnt. you just need to try it. the real payoff comes when you discover that deleting the current paragraph is as easy as typing "dip". to copy the current sentence is then done with "yis" (read: "yank inner sentence"). deleting the rest of the text until the very end only needs "dG" as 'G' moves the cursor to the very end. you can also highlight some text like with the mouse using the visual commands 'v', 'V', and CTRL-V. however - no mouse required. simply hit 'd' or 'y' now to delete or yank the selected text. defining an abbreviation like "yt" for inserring "yours truly - Ruth" just needs this: :ab yt yours truly - Ruth once you enter "ys" and end the word with, say, a space, it gets expanded automatically. and indenting the current paragraph is done with only ">ip" ('>' indents text). and if you would rather use the function key F4 for this then just "map" it like this: map >ip done! :) no mouse required. and it's fast as hell. especially when you know how to touch type. and the best thing about this program is that an 'u' undos the last change. if something goes wrong, just 'u'ndo! and if you went too far then "redo" it with CTRL-R. Franz can definitely show you a LOT more. (hey, i'd do that myself if i were there!) please, Ruth - give this program a try! i am sure your typing can benefit from those powerful commands and techniques. > Sorry I'm so "frech" but you are too, > so I'm not really sorry. woof woof! please - dont be! actually, being cheeky in email is FUN! :-) Sven