summaryrefslogtreecommitdiffstats
path: root/exrc
blob: 6d4e4e083b7e86ce5a479486bc166c17639b4974 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
set term=xterm-256color
set autoindent
set ignorecase
set nolist
set magic
set mesg
set number
set ruler
set shiftwidth=4
set showmatch
set showmode
set tabstop=4
set tildeop
set windowname
set wraplen=80
set leftright
set extended
set iclower
set searchincr
set verbose
set redraw
set para=BlBdPpIt
set sections=SeAhBhChDh
set fileencoding=UTF-8

map ZZ m
map ) 0
map 0 ^
map - $
map W b
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
Un proyecto texto-plano.xyz