290 augroup vimrc |
290 augroup vimrc |
291 autocmd! |
291 autocmd! |
292 |
292 |
293 autocmd WinLeave * if !pumvisible() | stopinsert | endif |
293 autocmd WinLeave * if !pumvisible() | stopinsert | endif |
294 |
294 |
295 " set and load a session based on servername |
|
296 autocmd VimEnter * nested call vimrc#AutoSessionCheck() |
|
297 |
|
298 " complement to autowriteall |
295 " complement to autowriteall |
299 autocmd FocusLost * silent! wa |
296 autocmd FocusLost * silent! wa |
300 |
297 |
301 " Make paths when writing, as necessary |
298 " Make paths when writing, as necessary |
302 autocmd BufWritePre * :call vimrc#MkNonExDir(expand('<afile>'), +expand('<abuf>')) |
299 autocmd BufWritePre * :call vimrc#MkNonExDir(expand('<afile>'), +expand('<abuf>')) |
303 |
300 |
304 " Jump to last known pos |
301 if ! &diff |
305 autocmd BufReadPost * |
302 " set and load a session based on servername |
306 \ if &filetype !~# 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") | |
303 autocmd VimEnter * nested call vimrc#AutoSessionCheck() |
307 \ exe "normal! g`\"" | |
304 |
308 \ endif |
305 " Jump to last known pos |
309 |
306 autocmd BufReadPost * |
310 " Simple highlight conflict markers |
307 \ if &filetype !~# 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") | |
311 autocmd BufReadPost * |
308 \ exe "normal! g`\"" | |
312 \ match Error "^\([<>|]\)\{7} \@=\|^=\{7}$" |
309 \ endif |
|
310 |
|
311 " Simple highlight conflict markers |
|
312 autocmd BufReadPost * |
|
313 \ match Error "^\([<>|]\)\{7} \@=\|^=\{7}$" |
|
314 endif |
313 |
315 |
314 " Simplify noisy ltag output |
316 " Simplify noisy ltag output |
315 autocmd BufReadPost quickfix |
317 autocmd BufReadPost quickfix |
316 \ if w:quickfix_title =~# '^:ltag' | |
318 \ if w:quickfix_title =~# '^:ltag' | |
317 \ setl modifiable | |
319 \ setl modifiable | |