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 |