|
|
| Line 12: |
Line 12: |
| |
|category2= |
|
|category2= |
| |
}} |
|
}} |
| − |
To save a file, we do <tt><Esc>:w<Enter></tt>. |
+ |
To save a file, we do <code><Esc>:w<Enter></code>. |
| |
|
|
|
| |
If you add the following line to your vimrc, you can easily save a file by pressing F2. |
|
If you add the following line to your vimrc, you can easily save a file by pressing F2. |
| Line 20: |
Line 20: |
| |
|
|
|
| |
==Comments== |
|
==Comments== |
| − |
I just press <tt>ZZ</tt> to save and exit. |
+ |
I just press <code>ZZ</code> to save and exit. |
| |
|
|
|
| |
---- |
|
---- |
Latest revision as of 06:02, July 13, 2012
To save a file, we do <Esc>:w<Enter>.
If you add the following line to your vimrc, you can easily save a file by pressing F2.
map <F2> :w! <CR>
I just press ZZ to save and exit.
F2 is too far away from where I keep my fingers - I prefer the following:
map W :wa^M
map! ^W ^[:wa^Ma
This makes W save all buffers in command mode and Ctrl+W do the same in insert mode.