-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
202 lines (126 loc) · 4.13 KB
/
.vimrc
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
"""" Core stuff
version 5.0
set nocompatible " has to be on the first line
set tabstop=4
set modeline
set modelines=3
set exrc
"let mapleader="~" " make sure this is done before any <Leader> stuff happens
filetype on
filetype plugin on
filetype indent on
set number
set nobackup
set viminfo='20,\"50
" don't forget to set 'export TERM=xterm-256color'
set background=dark
colorscheme blackboard
" Otherwise, contents of last visual will appear in X11 selection buffer - eek!
set clipboard=autoselectml
"""" Charset
set fencs=ucs-bom,utf-8,default,latin2
"""" Autocompletion
set wildchar=<Tab>
set wildmenu
set wildmode=longest:full,full
set history=999
"""" Searching
set ignorecase
set smartcase
set hlsearch
set incsearch
set magic
set showmatch
set mat=2
"""" Indentation
set shiftwidth=4
"set cindent
"set smartindent
set autoindent
set so=7
"""" Formatting
set formatoptions=cql
set list listchars=tab:\ \ ,trail:-
syntax enable
"""" Folding
set foldmethod=indent
set foldenable
set foldlevel=99
"""" Tags
set tags=./tags,tags,./TAGS,TAGS,tags,TAGS,../tags,../TAGS,../../tags,../../TAGS,../../../tags,../../../TAGS,../../../../tags,../../../../TAGS,../../../../../tags,../../../../../TAGS,../../../../../../tags,../../../../../../TAGS,../../../../../../../tags,../../../../../../../TAGS,../../../../../../../../tags,../../../../../../../../TAGS,../../../../../../../../../tags,../../../../../../../../../TAGS,../../../../../../../../../../tags,../../../../../../../../../../TAGS,../../../../../../../../../../../tags,../../../../../../../../../../../TAGS,../../../../../../../../../../../../tags,../../../../../../../../../../../../TAGS,/usr/include/tags,/usr/include/TAGS,/usr/local/include/tags,/usr/local/include/TAGS
"""" User mapping (misc)
" v) "`"' visual content quoted
vnoremap "" <esc>:set paste<cr>`>a"<c-o>`<"<esc>:set nopaste<cr>`>2l
vnoremap "' <esc>:set paste<cr>`>a'<c-o>`<'<esc>:set nopaste<cr>
vnoremap "` <esc>:set paste<cr>`>a`<c-o>`<`<esc>:set nopaste<cr>
" v) "<>[](){} visual content parenthesed
vnoremap "< <esc>:set paste<cr>`>a><c-o>`<<<esc>:set nopaste<cr>
vnoremap "> <esc>:set paste<cr>`>a><c-o>`<<<esc>:set nopaste<cr>`>2l
vnoremap "[ <esc>:set paste<cr>`>a]<c-o>`<[<esc>:set nopaste<cr>
vnoremap "] <esc>:set paste<cr>`>a]<c-o>`<[<esc>:set nopaste<cr>`>4l
vnoremap "( <esc>:set paste<cr>`>a)<c-o>`<(<esc>:set nopaste<cr>
vnoremap ") <esc>:set paste<cr>`>a)<c-o>`<(<esc>:set nopaste<cr>`>2l
vnoremap "{ <esc>:set paste<cr>`>a}<c-o>`<{<esc>:set nopaste<cr>
vnoremap "} <esc>:set paste<cr>`>a}<c-o>`<{<esc>:set nopaste<cr>`>2l
" n> m-h hide highlight
noremap h :nohl<cr>
"" Buffer switching
map <A-1> :b1<CR>
map <A-2> :b2<CR>
map <A-3> :b3<CR>
map <A-4> :b4<CR>
map <A-5> :b5<CR>
map <A-6> :b6<CR>
map <A-7> :b7<CR>
map <A-8> :b8<CR>
map <A-9> :b9<CR>
map <A-0> :b10<CR>
map <C-Tab> :bn<CR>
map <S-C-Tab> :bp<CR>
"""" Per-filetype mapping
au BufEnter *vimrc set keywordprg=
au BufLeave *vimrc set keywordprg=man
au FileType perl set formatoptions=cql
au! BufNewFile,BufRead *.ino setlocal ft=arduino
au! BufNewFile,BufRead *.pde setlocal ft=arduino
au! BufNewFile,BufRead *.md setlocal ft=markdown
"""" Plugins
"" Increment
" c-A in visual mode works as gradual incrementation
vnoremap <c-a> :Inc<CR>
"" Calendar
let g:calendar_mark='right'
let g:calendar_navi='both'
let g:calendar_monday=1
"" EnhancedCommentify
let g:EnhCommentifyPretty = 'Yes'
let g:EnhCommentifyRespectIdent = 'Yes'
let g:EnhCommentifyUseAltKeys = 'Yes'
"" MiniBufExplorer
let g:miniBufExplSplitBelow=1
"" VimSpell
"let spell_language_list = "english,czech"
""highlight SpellErrors ctermbg=Red guibg=Red ctermfg=White guifg=White cterm=underline gui=underline term=reverse
"highlight link SpellErrors Error
"" TeX
let g:tex_flavor = "latex"
"" SQL
" This is something purely evil, hijacking C-C.
let g:omni_sql_no_default_maps = 1
"""" Sourcing standalone rcs
"so /home/pasky/.vimrc.shell
"""" UI
"" I/O
set mouse=
set bg=dark
"set bg=light
set bs=2
set ttimeout ttimeoutlen=10 " esc v insert modu ma okamzitou odezvu
"set statusline=%{VimBuddy()}
set ruler
"" Windows
set noequalalways
"" Buffers
set switchbuf=useopen
"" GUI
set guifont=Monospace\ 9