Tip #582: Quick way to write to your file.
tip karma |
Rating -6/26, Viewed by 2162
|
created: |
|
October 9, 2003 17:07 |
|
complexity: |
|
basic |
author: |
|
somebody |
|
as of Vim: |
|
5.7 |
Put this in your .vimrc
map , :w^M
When you need to save your file instead of typing :w and hitting enter, just hit the comma (,) Note that with vim you may need to type CTRL-Q first to get the verbose CTRL-M character in your file. For those who have earlier versions or non-PC compatible, CTRL-V before CTRL-M will get that character in there. Has been life-changing for me :-). I can't take the credit as I found this one years back when scanning info about building html pages. The author had a little script that checked the update of the file and sent a message to the browser to re-read the file when the file was written. He's the one who suggested mapping an unmapped button to do this.
<<Using vim to view source and edit textarea in mozilla/firebird |
Vim as XML Editor >>
Additional Notes
|