-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
153 lines (133 loc) · 2.49 KB
/
vimrc
File metadata and controls
153 lines (133 loc) · 2.49 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
"" DO NOT EDIT
"" This file is under PUPPET control
" tabs
set paste
set tabstop=4
" navigation arrow
set nocp
" ignore registry
"set ic
" color find
set hls
" incremental search
set is
" default encode
set encoding=utf-8
" term encode (must coincide "encoding")
set termencoding=utf-8
" file encodings and sequence determination
set fileencodings=utf8,cp1251,koi8-r
" fix backspace in CentOS
set backspace=indent,eol,start
" ru map
map ё `
map й q
map ц w
map у e
map к r
map е t
map н y
map г u
map ш i
map щ o
map з p
map х [
map ъ ]
map ф a
map ы s
map в d
map а f
map п g
map р h
map о j
map л k
map д l
map ж ;
map э '
map я z
map ч x
map с c
map м v
map и b
map т n
map ь m
map б ,
map ю .
map Ё ~
map Й Q
map Ц W
map У E
map К R
map Е T
map Н Y
map Г U
map Ш I
map Щ O
map З P
map Х {
map Ъ }
map Ф A
map Ы S
map В D
map А F
map П G
map Р H
map О J
map Л K
map Д L
map Ж :
map Э "
map Я Z
map Ч X
map С C
map М V
map И B
map Т N
map Ь M
map Б <
map Ю >
"tabs
map <C-Left> :tabprev<CR>
map <C-Right> :tabnext<CR>
map <C-n> :tabnew
""" HIGHLIGHT
" default syntax on
syntax on
" my highlight group
highlight ExtraWhitespace ctermbg=red guibg=red
" auto chmod
au BufWritePost * if getline(1) =~ "^#!.*/bin/"|silent !chmod a+x %
" highlight MySQL
if has("autocmd")
autocmd BufRead *.sql set filetype=mysql
endif
" highlight config files
autocmd BufReadPost config set filetype=config
if version >= 714
" highlight trailing spaces
au BufNewFile,BufRead * let b:mtrailingws=matchadd('ErrorMsg', '\s\+$', -1)
" highlight tabs between spaces
au BufNewFile,BufRead * let b:mtabbeforesp=matchadd('ErrorMsg', '\v(\t+)\ze( +)', -1)
au BufNewFile,BufRead * let b:mtabaftersp=matchadd('ErrorMsg', '\v( +)\zs(\t+)', -1)
" highlight string longer than eighty symbol
au BufWinEnter * let w:m1=matchadd('Search', '\%<81v.\%>77v', -1)
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
endif
" Show trailing whitespace:
match ExtraWhitespace /\s\+$/
" Show trailing whitepace and spaces before a tab:
match ExtraWhitespace /\s\+$\| \+\ze\t/
" Show tabs that are not at the start of a line:
match ExtraWhitespace /[^\t]\zs\t\+/
" Show spaces used for indenting (so you use only tabs for indenting).
match ExtraWhitespace /^\t*\zs \+/
" Save history changes
if version >= 730
execute "silent! !install -d ~/.vim/undodir"
set history=64
set undolevels=128
set undodir=~/.vim/undodir/
set undofile
set undolevels=1000
set undoreload=10000
endif