|
|
Uh, actually...
I've used both nvi and vim (along with various earlier incarnations of vi) for a very long time, and I have to say, nvi is one I really try to avoid, because I've seen it corrupt data in a number of circumstances. In particular, filtering large blocks of text (e.g. "!Gsort") will sometimes mangle large sections of text (replacing them with nulls or garbage), and recovering files (e.g. "vi -r filename" after a network connection drop) often doesn't work (i.e. brings up an nvi session that core dumps the moment you try to do anything with it). So, use at your own risk.
Uh, actually...
The one thing I can't get vim to do which I would really like is for the insert mode to quit when I use an arrow key. I've got an environment variable (EXINIT) which contains a load of key mappings which work a treat with older versions of vi, but vim seems to ignore the 'escape' code in it. This is what it looks like:
Can anyone give me a way of making vim behave in the same way?
Re:Uh, actually...
That is precisely what the .vimrc, as mentioned above, is for. Just include your map commands in the vimrc, though your syntax will be a bit different than for your environment variable. I am pasting several of my mappings (just as they appear in my vimrc) below. It should be noted that <ESC> is actually what you type (literally) where you want an escape character. Same thing with <CR> for a carriage return. The syntax of <C-x>, where x may be replace with any letter, is what should be entered in order to obtain a control-ed character. There are similar <somethings> for the arrow keys and such. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|