1 <span class="co0"># let's edit the ~/.vimrc file</span>
2 $ <span class="kw2">vim</span> ~<span class="sy0">/</span>.vimrc
3 <span class="co0"># go to the end of file and append this</span>
4 <span class="co0"># show line numbers</span>
5 <span class="kw1">set</span> number
6 <span class="co0"># incremental search</span>
7 <span class="kw1">set</span> incsearch
8 <span class="co0"># auto indentation</span>
9 <span class="kw1">set</span> autoindent
10 <span class="co0"># tab size</span>
11 <span class="kw1">set</span> <span class="re2">tabstop</span>=<span class="nu0">2</span>
12 <span class="co0"># indentation size (used on auto indentation)</span>
13 <span class="kw1">set</span> <span class="re2">shiftwidth</span>=<span class="nu0">2</span>
14 <span class="co0"># unindent on the end of blocks (e.g. '}' on c)</span>
15 <span class="kw1">set</span> smartindent
16 <span class="co0"># save with CTRL-S</span>
17 map<span class="sy0">!</span> <span class="sy0"><</span>C-s<span class="sy0">></span> <span class="sy0"><</span>Esc<span class="sy0">></span>:<span class="kw2">w</span><span class="sy0"><</span>CR<span class="sy0">></span>
18 map <span class="sy0"><</span>C-s<span class="sy0">></span> <span class="sy0"><</span>Esc<span class="sy0">></span>:<span class="kw2">w</span><span class="sy0"><</span>CR<span class="sy0">></span>
19 <span class="co0"># call make with F9</span>
20 map<span class="sy0">!</span> <span class="sy0"><</span>F9<span class="sy0">></span> <span class="sy0"><</span>C-g<span class="sy0">></span>u<span class="sy0"><</span>Esc<span class="sy0">></span>:<span class="kw2">w</span><span class="sy0"><</span>CR<span class="sy0">></span>ggdG<span class="sy0">!!</span><span class="kw2">make</span><span class="sy0"><</span>CR<span class="sy0">></span>
21 map <span class="sy0"><</span>F9<span class="sy0">></span> <span class="sy0"><</span>C-g<span class="sy0">></span>u<span class="sy0"><</span>Esc<span class="sy0">></span>:<span class="kw2">w</span><span class="sy0"><</span>CR<span class="sy0">></span>ggdG<span class="sy0">!!</span><span class="kw2">make</span><span class="sy0"><</span>CR<span class="sy0">></span>
22 <span class="co0"># save the file</span>