(Change to TipImported template + severe manual clean) |
(Change <tt> to <code>, perhaps also minor tweak.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|previous=996 |
|previous=996 |
||
|next=998 |
|next=998 |
||
− | |created= |
+ | |created=2005 |
|complexity=basic |
|complexity=basic |
||
− | |author= |
+ | |author= |
|version=6.0 |
|version=6.0 |
||
|rating=5/10 |
|rating=5/10 |
||
+ | |category1= |
||
+ | |category2= |
||
}} |
}} |
||
− | To save a file, we do |
+ | 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. |
||
− | |||
<pre> |
<pre> |
||
− | map |
+ | map <F2> :w! <CR> |
</pre> |
</pre> |
||
==Comments== |
==Comments== |
||
− | I just press < |
+ | I just press <code>ZZ</code> to save and exit. |
---- |
---- |
||
F2 is too far away from where I keep my fingers - I prefer the following: |
F2 is too far away from where I keep my fingers - I prefer the following: |
||
− | |||
<pre> |
<pre> |
||
map W :wa^M |
map W :wa^M |
Latest revision as of 06:02, 13 July 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>
Comments[]
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.