1
2
3
4
5
6
7
8
9
10
11
12
13
14 if has('eval') | unlet! g:colors_name | endif
15
16 set maxmem=256
17 set regexpengine=0
18
19 if has('multi_byte')
20 scriptencoding utf-8
21 set enc=utf-8
22 set fileencodings=ucs-bom,utf-8,latin1
23 if version >= 700
24 set lcs=tab:»·,trail:·,eol:¬,extends:>,precedes:<,nbsp:␣
25 else
26 set lcs=tab:»·,trail:·,eol:¬,extends:>,precedes:<
27 endif
28 endif
29
30 language eo.UTF-8
31
32 if has('syntax') | syntax on | endif
33 if has('autocmd')
34 filetype on
35 filetype plugin on
36 endif
37
38 if has('gui_running')
39 if has("win16") || has("win32") || has("win95") || has("win64")
40 set guifont=Lucida\ Console:h10
41 else
42 set guifont=Monospace\ 9
43 endif
44 if exists('+toolbar') | set toolbar=icons | endif
45 if exists('+toolbariconsize') | set toolbariconsize=tiny | endif
46 else
47 if has('eval') | let Tlist_Inc_Winwidth=0 | endif
48 endif
49
50
51 if exists('+fsync') | set nofsync | endif
52
53
54 set timeout timeoutlen=3000 ttimeoutlen=100
55
56 set nocompatible
57 set history=400
58 set textwidth=0
59 set backup
60 if has('persistent_undo')
61 set undodir=~/UNDO
62 set undofile
63 endif
64 if exists('+undoreload') | set undoreload=100000 | endif
65 if exists('+cryptmethod') | set cryptmethod=blowfish | endif
66
67 if has('mouse') | set mouse=a | endif
68
69 set wildmode=longest,list
70 set wildmenu
71 set number
72 set splitbelow
73 set hidden
74 set nostartofline
75 set cpoptions=ces$
76 set backspace=indent,eol,start
77 set whichwrap+=<,>,[,]
78 set wrap
79 set showbreak=:
80 set laststatus=2
81 set shiftwidth=2
82 set noshiftround
83 set softtabstop=2
84 set autoindent
85 set smartindent
86 set expandtab
87 set ignorecase
88 set infercase
89 set smartcase
90 set cino:0
91 set comments=sr:/*,mb:*,ex:*/
92 set formatoptions=tcqor
93
94 if exists('+autochdir') | set autochdir | endif
95 set visualbell
96 if has('cmdline_info')
97 set ruler
98 set showcmd
99 endif
100 set nocursorline
101 set showmatch
102 if has('extra_search')
103 set hlsearch
104 set incsearch
105 endif
106 set list
107 set matchpairs+=<:>
108 set virtualedit=block
109 set display=lastline,uhex
110
111 set tags=~/sb/languagetool/tags,tags,~/TAGS/tags,~/TAGS/stl-tags
112
113 if has('cscope')
114 if filereadable(expand("$HOME/TAGS/cscope.out"))
115 cs kill -1
116 cs add ~/TAGS/cscope.out
117 endif
118 set cscopeverbose
119
120
121 set cscopequickfix=s-,c-,d-,i-,t-,e-,g-
122 endif
123
124 set makeprg=(cd\ ~/dev-all/maptoolchainsource/main/Source/&&make\ DEBUG=yes\ COLOR=\ $*)
125
126 if has('eval')
127 let g:lex_uses_cpp=1
128 let g:yacc_uses_cpp=1
129 let g:load_doxygen_syntax=1
130 let g:is_posix=1
131 let g:c_gnu=1
132 let g:netrw_special_syntax=1
133 let g:netrw_liststyle=3
134 let g:netrw_browse_split=4
135 let g:vimsyntax_noerror=1
136
137
138 let Tlist_Process_File_Always = 1
139
140
141
142 let html_use_css=1
143 let html_use_xhtml=1
144 let html_dynamic_folds=1
145
146
147 let g:CSApprox_attr_map = { 'bold' : 'bold', 'italic' : '', 'sp' : '' }
148 endif
149
150
151 vnoremap > >gv
152 vnoremap < <gv
153
154 noremap <c-]> g<c-]>
155 noremap <c-g> g<c-g>
156
157
158
159 noremap <down> gj
160 noremap <up> gk
161
162 map <F2> :set paste!<CR>:set paste?<CR>
163 imap <F2> <C-O>:set paste<CR>:set paste?<CR>
164 map <F3> :set number!<CR>:set number?<CR>
165 imap <F3> <C-O>:set number!<CR><C-O>:set number?<CR>
166 map <F4> :set hlsearch!<CR>:set hlsearch?<CR>
167 imap <F4> <C-O>:set hlsearch!<CR><C-O>:set hlsearch?<CR>
168 map <F5> :set list!<CR>:set list?<CR>
169 imap <F5> <C-O>:set list!<CR><C-O>:set list?<CR>
170 nnoremap <silent> <F6> :TlistToggle<CR>
171
172 if has('spell')
173 set spell
174
175 if has('eval')
176
177 let g:myLangIdx = 0
178 let g:myLangCodes = [ "en_us", "eo", "fr", "it", "br", "nl" ]
179 let g:myLangs = [ "language:", "lingvo:", "langue :", "lingua:", "yezh:", "taal:" ]
180 function! MySpellLang()
181 let g:myLangIdx = g:myLangIdx + 1
182 if g:myLangIdx >= len(g:myLangs) | let g:myLangIdx = 0 | endif
183
184 exe "setlocal spell spelllang=" . g:myLangCodes[g:myLangIdx]
185 echon g:myLangs[g:myLangIdx] . ' ' . g:myLangCodes[g:myLangIdx]
186 endf
187
188 map <F7> :call MySpellLang()<CR>
189 imap <F7> <C-o>:call MySpellLang()<CR>
190 endif
191 map <F8> :set spell!<CR>
192 endif
193
194
195
196 nnoremap <F9> yyp<c-v>$r-
197 inoremap <F9> <esc>yyp<c-v>$r-A
198
199
200 map <F10> :echo
201 \ "hi<" . synIDattr(synID(line("."),col("."),1),"name")
202 \ . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") \
203 \ . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
204 \ . ">"<CR>
205
206 map <F12> :!ctags -R --c++-kinds=+p --fields=+iaSn --extra=+q .<CR>
207
208
209
210
211 inoremap <c-u> <c-g>u<c-u>
212 inoremap <c-w> <c-g>u<c-w>
213 inoremap <bs> <c-g>u<bs>
214 inoremap <del> <c-g>u<del>
215 inoremap <tab> <tab><c-g>u
216
217 if version >= 700 && has('autocmd')
218
219 au! CursorHoldI * call feedkeys("\<C-G>u", "nt")
220 endif
221
222
223 set undolevels=4000
224
225
226 function! SyntaxItem()
227 return synIDattr(synID(line("."),col("."),1),"name")
228 endfunction
229
230
231 fun! ShowUtf8Sequence()
232 try
233 let p = getpos('.')
234 redir => utfseq
235 sil normal! g8
236 redir End
237 call setpos('.', p)
238 return substitute(matchstr(utfseq, '\x\+ .*\x'), '\<\x', '0x&', 'g')
239 catch
240 return '?'
241 endtry
242 endfunction
243
244 if has('statusline')
245 if version >= 700
246
247 set statusline =
248 set statusline+=%#User1#
249 set statusline+=%n
250 set statusline+=%{'/'.bufnr('$')}\
251 set statusline+=%#User2#
252 set statusline+=%f
253 set statusline+=%#User1#
254 set statusline+=%h%m%r%w\
255 set statusline+=%{(&key==\"\"?\"\":\"encr,\")}
256 set statusline+=%{strlen(&ft)?&ft:'none'},
257 set statusline+=%{(&fenc==\"\"?&enc:&fenc)},
258 set statusline+=%{((exists(\"+bomb\")\ &&\ &bomb)?\"B,\":\"\")}
259 set statusline+=%{&fileformat},
260 set statusline+=%{&spelllang},
261 set statusline+=%(%{Tlist_Get_Tagname_By_Line()}%),
262 set statusline+=%{SyntaxItem()}
263 set statusline+=%=
264 set statusline+=%#User2#
265 set statusline+=%{ShowUtf8Sequence()}\
266 set statusline+=%#User1#
267 set statusline+=U+%04B\
268 set statusline+=%-6.(%l/%{line('$')},%c%V%)\ %<%P
269
270
271 let g:Active_statusline=&g:statusline
272 let g:NCstatusline=substitute(
273 \ substitute(g:Active_statusline,
274 \ 'User1', 'User3', 'g'),
275 \ 'User2', 'User4', 'g')
276 endif
277 endif
278
279
280
281
282
283 iab 8< --- 8< --- cut here --- 8< --- cut here --- 8< ---
284 iab fori for (i = 0; i <; i++)<cr>{<cr>}<Esc>kk0f<a
285 iab forj for (j = 0; j <; j++)<cr>{<cr>}<Esc>kk0f<a
286
287 if !exists(':DiffOrig')
288 command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
289 \ | wincmd p | diffthis
290 endif
291
292
293 if version >= 700
294 if has('insert_expand')
295 let OmniCpp_NamespaceSearch = 1
296 let OmniCpp_GlobalScopeSearch = 1
297 let OmniCpp_ShowAccess = 1
298 let OmniCpp_MayCompleteDot = 0
299 let OmniCpp_MayCompleteArrow = 0
300 let OmniCpp_MayCompleteScope = 0
301 let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
302
303 if has('autocmd')
304
305 au! CursorMovedI,InsertLeave * if pumvisible() == 0 | sil! pclose | endif
306 set completeopt=menuone,longest,preview
307 endif
308 endif
309 endif
310
311 if has('autocmd')
312
313
314 au! BufWritePost .vimrc nested source %
315
316
317
318
319
320
321
322
323
324 if version >= 700
325 if &term =~ "xterm\\|rxvt"
326 silent !echo -ne "\033]12;red\007"
327 let &t_SI = "\033]12;orange\007"
328 let &t_EI = "\033]12;red\007"
329 au! VimLeave * :sil !echo -ne "\033]12;red\007"
330 endif
331 endif
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346 augroup CursorHighlight
347 au!
348 au WinEnter * let&l:statusline = g:Active_statusline
349 au WinLeave * let&l:statusline = g:NCstatusline
350 augroup END
351 endif
352
353 if &term != 'cygwin' && &term != 'linux'
354 set t_Co=256
355 endif
356
357
358 let g:languagetool_winheight=16
359 let g:languagetool_disable_rules='ENGLISH_WORD_REPEAT_BEGINNING_RULE,WHITESPACE_RULE,EN_QUOTES,FRENCH_WHITESPACE,UPPERCASE_SENTENCE_START,APOS'
360 let g:languagetool_jar='$HOME/sb/languagetool/languagetool-standalone/target/LanguageTool-2.5-SNAPSHOT/LanguageTool-2.5-SNAPSHOT/languagetool-commandline.jar'
361
362 let g:vimchant_spellcheck_lang = 'fr'
363
364 let g:MRU_File=expand("$HOME/.mru")
365
366 let g:ackprg="ack-grep -H --nocolor --nogroup --column"
367
368 fun! ShowFuncKeys(bang)
369 for i in range(1,12)
370 exe (a:bang == "!" ? 'verbose' : '') . " map <F".i.">"
371 endfor
372 endfun
373 com! -bang ShowFuncKeys :call ShowFuncKeys(<q-bang>)
374
375
376
377
378 colorscheme rastafari