.vimrc

changeset 641
60b56bbfc143
parent 640
f8985ae54969
child 642
18efa35a0837
equal deleted inserted replaced
640:f8985ae54969 641:60b56bbfc143
149 set incsearch 149 set incsearch
150 set hlsearch 150 set hlsearch
151 set ignorecase 151 set ignorecase
152 set smartcase 152 set smartcase
153 153
154 if has('gui_running') || $LANG =~ 'UTF-8' 154 if has('gui_running') || $LANG =~# 'UTF-8'
155 set listchars=tab:⇥·,trail:◼,nbsp:◻,extends:⥂,precedes:⥃ 155 set listchars=tab:⇥·,trail:◼,nbsp:◻,extends:⥂,precedes:⥃
156 " eol:↩ not as useful as trail i think 156 " eol:↩ not as useful as trail i think
157 set fillchars=fold:∷,vert:│ 157 set fillchars=fold:∷,vert:│
158 else 158 else
159 set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:< 159 set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<
261 " complement to autowriteall 261 " complement to autowriteall
262 autocmd FocusLost * silent! wa 262 autocmd FocusLost * silent! wa
263 263
264 " Jump to last known pos 264 " Jump to last known pos
265 autocmd BufReadPost * 265 autocmd BufReadPost *
266 \ if &filetype !~ 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") | 266 \ if &filetype !~# 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") |
267 \ exe "normal! g`\"" | 267 \ exe "normal! g`\"" |
268 \ endif 268 \ endif
269 269
270 " double-click to edit in vimfiler 270 " double-click to edit in vimfiler
271 autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file) 271 autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
272 272
273 " Simplify noisy ltag output 273 " Simplify noisy ltag output
274 autocmd BufReadPost quickfix 274 autocmd BufReadPost quickfix
275 \ if w:quickfix_title =~ '^:ltag' | 275 \ if w:quickfix_title =~# '^:ltag' |
276 \ setl modifiable | 276 \ setl modifiable |
277 \ silent exe ':%s/\^\\V\s*\|\\\$|.*//g' | 277 \ silent exe ':%s/\^\\V\s*\|\\\$|.*//g' |
278 \ setl nomodifiable | 278 \ setl nomodifiable |
279 \ endif 279 \ endif
280 280
453 try 453 try
454 execute 'source ' . s:filename . '.local' 454 execute 'source ' . s:filename . '.local'
455 catch 455 catch
456 endtry 456 endtry
457 457
458 if g:airline_powerline_fonts == 0 && (has('gui_running') || $LANG =~ 'UTF-8') 458 if g:airline_powerline_fonts == 0 && (has('gui_running') || $LANG =~# 'UTF-8')
459 let g:airline_left_sep = '▒' 459 let g:airline_left_sep = '▒'
460 let g:airline_right_sep = g:airline_left_sep 460 let g:airline_right_sep = g:airline_left_sep
461 endif 461 endif
462 462
463 if has('gui_running') 463 if has('gui_running')
469 set guicursor+=a:blinkwait1000-blinkon1200-blinkoff250 469 set guicursor+=a:blinkwait1000-blinkon1200-blinkoff250
470 470
471 colorscheme jellybeans 471 colorscheme jellybeans
472 else 472 else
473 " vertical bar in insert mode. 473 " vertical bar in insert mode.
474 if &term =~ '^\(xterm\|screen\|rxvt\)' 474 if &term =~# '^\(xterm\|screen\|rxvt\)'
475 let &t_SI = "\e[5 q" 475 let &t_SI = "\e[5 q"
476 let &t_EI = "\e[0 q" 476 let &t_EI = "\e[0 q"
477 if exists("$TMUX") 477 if exists("$TMUX")
478 let &t_SI = "\ePtmux;" . substitute(&t_SI, "\e", "\e\e", 'g') . "\e\\" 478 let &t_SI = "\ePtmux;" . substitute(&t_SI, "\e", "\e\e", 'g') . "\e\\"
479 let &t_EI = "\ePtmux;" . substitute(&t_EI, "\e", "\e\e", 'g') . "\e\\" 479 let &t_EI = "\ePtmux;" . substitute(&t_EI, "\e", "\e\e", 'g') . "\e\\"
480 endif 480 endif
481 endif 481 endif
482 482
483 if $TERM =~ 'rxvt-unicode' 483 if $TERM =~# 'rxvt-unicode'
484 set ttymouse=urxvt 484 set ttymouse=urxvt
485 set mouse=a 485 set mouse=a
486 map <Esc>[7~ <Home> 486 map <Esc>[7~ <Home>
487 map <Esc>[8~ <End> 487 map <Esc>[8~ <End>
488 endif 488 endif

mercurial