diff options
Diffstat (limited to 'exrc')
-rw-r--r-- | exrc | 60 |
1 files changed, 59 insertions, 1 deletions
@@ -1,3 +1,4 @@ +set term=xterm-256color set autoindent set ignorecase set nolist @@ -16,8 +17,12 @@ set leftright set extended set iclower set searchincr +set verbose +set redraw set para=BlBdPpIt -set sect=ShSs +set sections=SeAhBhChDh +set fileencoding=UTF-8 + map ZZ m map ) 0 map 0 ^ @@ -27,3 +32,56 @@ map m ' map M ` map Y y$ map gg 1G +map G GA +map Q :wq! +map R :ex + +""Formatting +" indent lines +map gi :%!indent -i4 +" reformat, wrap text at 72ch +map gf :%!fmt -w 80 % +" reformat paragraph +map gp :?^$?,//!fmt -w 80 +" sort lines alphabetically +map gs :%!sort -u +" substitute patterns up to current position +map gr :^,.s///g +" remove leading tabs +map gl :%s/^[ \t]*// +" double space, whole file +map gd :%!sed G +" expand TABS out in buffer +map ge 'a!'bexpand +"comment lines in buffer +map gc :'a,'bs/^/#/ +" uncomment lines in buffer +map gu :'a,'bs/# *// +" remove trailing spaces +map gt :%s/ *$// + +""Manipulating Buffers +" display vi buffers +map K :display buffers +" cut current line to buffer '1' +map C "1Y$dd +" paste '1' after current position +map V "1PASTE +" mark current position as begin of new buffer +map # ma +" mark current position as end of new buffer +map * mb +" append new buffer to next line +map bv :'a,'b co . +" delete marked buffer +map be :'a,'b del . +" move marked buffer to 'n' line +map bm :'a,'b mo . +" convert marked buffer to UPPERCASE +map bc :'a,'bs/.*/\U&/ +" convert marked buffer to LOWERCASE +map bl :'a,'bs/.*/\L&/ +" trim white space from marked buffer +map bt :'a,'bs/[ ^I][ ^I]*$//g +" write marked buffer to file +map bw :'a;'bw |