.vimrc

changeset 396
2f02fa724f42
parent 370
53d2c0f25337
child 398
15a173de64c4
equal deleted inserted replaced
395:206cc4d98d49 396:2f02fa724f42
5 5
6 let on_windows=0 6 let on_windows=0
7 if has('win32') || has('win64') 7 if has('win32') || has('win64')
8 " vim in cygwin has win32 = 0 and win32unix = 1 8 " vim in cygwin has win32 = 0 and win32unix = 1
9 let on_windows=1 9 let on_windows=1
10 end 10 endif
11 11
12 " Set up Vundle and plugins {{{ 12 " Set up Vundle and plugins {{{
13 let installed_vundle=0 13 let installed_vundle=0
14 14
15 if on_windows == 0 15 if on_windows == 0
305 set autowriteall 305 set autowriteall
306 306
307 if has('persistent_undo') 307 if has('persistent_undo')
308 set undofile 308 set undofile
309 set undodir=$MYVIM/var/undo//,. 309 set undodir=$MYVIM/var/undo//,.
310 end 310 endif
311 " }}} 311 " }}}
312 312
313 313
314 " Autocmds {{{ 314 " Autocmds {{{
315 function! AutoSessionConfig()
316 if strlen(v:servername) > 0
317 let g:unite_source_session_default_session_name = tolower(v:servername)
318 let g:unite_source_session_enable_auto_save = 1
319
320 UniteSessionLoad
321 endif
322 endfunction
323
315 augroup vimrc 324 augroup vimrc
316 autocmd! 325 autocmd!
326
327 autocmd VimEnter * call AutoSessionConfig()
317 328
318 autocmd FocusLost * silent! wa 329 autocmd FocusLost * silent! wa
319 330
320 " preload templates into new buffers by file extension 331 " preload templates into new buffers by file extension
321 "autocmd BufNewFile * silent! 0r $MYVIM/templates/%:e.template 332 "autocmd BufNewFile * silent! 0r $MYVIM/templates/%:e.template
475 set guicursor+=a:blinkwait1000-blinkon1200-blinkoff250 486 set guicursor+=a:blinkwait1000-blinkon1200-blinkoff250
476 487
477 if on_windows == 1 488 if on_windows == 1
478 " generally have a tiling wm on linux 489 " generally have a tiling wm on linux
479 set columns=120 lines=40 490 set columns=120 lines=40
480 end 491 endif
481 492
482 colorscheme jellybeans 493 colorscheme jellybeans
483 else 494 else
484
485 if $TERM =~ 'screen' 495 if $TERM =~ 'screen'
486 if $TERM == 'screen-bce' 496 if $TERM == 'screen-bce'
487 "if i'm not screen-bce, i'm not sure i have a good .screenrc in place 497 " if i'm not screen-bce, i'm not sure i have a good .screenrc in place
488 set t_Co=256 498 set t_Co=256
489 endif 499 endif
490 500
491 set mouse=a 501 set mouse=a
492 endif 502 endif
498 map <Esc>[8~ <End> 508 map <Esc>[8~ <End>
499 endif 509 endif
500 510
501 if &t_Co == 256 511 if &t_Co == 256
502 colorscheme jellybeans 512 colorscheme jellybeans
503 end 513 endif
504 514 endif
505 end 515
506 516

mercurial