The abrasive tone of your reply is uncalled for. I was sharing something I've found extremely useful in my (frankly, very short) time using vim. If I understand correctly, then the initiator of this thread also found it useful and I'm quite pleased.
Thanks, however, for the <C-v> tip -- i didn't know there was an easier way to enter control characters. On Mon, Nov 17, 2008 at 3:46 AM, Ben Schmidt <[EMAIL PROTECTED]>wrote: > > > <tangential-rant-about-greatness-of-digraphs> > > > > it is true that in mappings you can use <C-r>, etc instead of digraphs. > > however, i've found that for recording macros on the fly it's very > > helpful to know your digraphs -- particularly if you ever edit your > > macros after recording. > [...] > > </tangential-rant-about-greatness-of-digraphs> > > <helpful-info-about-what-these-are-and-easier-way-to-enter-them> > > Well, technically these aren't digraphs. They are control characters. > Digraphs in this context are just a way Vim provides to enter them. > > In my opinion, though, a better/easier way to enter these control > characters, if you really want to, is to type CTRL-V before them. You > don't need to know what the actual control codes are then (or the Vim > abbreviations for them--many of them are three-letter codes), you just > type, e.g., CTRL-V CTRL-A and, ^A (the control character) is inserted. > If you're on Windows with CTRL-V mapped to Paste, you use CTRL-Q > instead. > > :help i_CTRL-V > Also :help i_CTRL-V_digit > And :help c_CTRL-V is for the commandline, but basically the same > > So, really, I don't think it's helpful to know your digraphs at all. > Though it is helpful to know the CTRL-V/CTRL-Q trick. > > </helpful-info-about-what-these-are-and-easier-way-to-enter-them> > > <rant-about-limited-value-of-rightly-called-control-characters> > > But even so, I prefer the <> notation. This is partly because control > characters have other meanings. ^L means form feed (abbreviation > FF--meaning start a new page), ^M and ^J are carriage return (CR) and > line feed (LF), and you often can't include them because they are used > as line separators in text files, ^I is a tab (HT--horizontal tab) so > often becomes invisible, ^Z was used in DOS to mean end-of-file and some > programs still choke on it, ^Q and ^S (DC1 and DC3--device control) > often make terminals start and stop respectively so can mess things up > (though they aren't used usually in Vim for precisely that reason). In > short, control characters can have unwanted side effects when you > include them in text files, depending what you do with those files. > As a general practice, in configuration files, representations such as > using <> notation that do not use control characters are better. > > But yes, certainly if you want to record and edit macros and then reuse > them, you must use the control characters and not the <> notation, and I > indeed do that from time to time, so I agree it's handy to know for > in-memory Vim work. > > For reference, explanations of the ASCII control codes are here: > > http://www.cs.tut.fi/~jkorpela/chars/c0.html<http://www.cs.tut.fi/%7Ejkorpela/chars/c0.html> > > </rant-about-limited-value-of-rightly-called-control-characters> > > Ben. > > > > > > > > -- Christopher Suter --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
