# HG changeset patch # User Meredith Howard # Date 1641115262 21600 # Node ID 3f9185b6a5e3fa9d2a8ca94f2c5d07e5caddbae4 # Parent d8706e95ddeebbe23d3f4f041f72619de49b7b34 block some autocmds in diff mode diff --git a/.vimrc b/.vimrc --- a/.vimrc +++ b/.vimrc @@ -292,24 +292,26 @@ augroup vimrc autocmd WinLeave * if !pumvisible() | stopinsert | endif - " set and load a session based on servername - autocmd VimEnter * nested call vimrc#AutoSessionCheck() - " complement to autowriteall autocmd FocusLost * silent! wa " Make paths when writing, as necessary autocmd BufWritePre * :call vimrc#MkNonExDir(expand(''), +expand('')) - " Jump to last known pos - autocmd BufReadPost * - \ if &filetype !~# 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif + if ! &diff + " set and load a session based on servername + autocmd VimEnter * nested call vimrc#AutoSessionCheck() - " Simple highlight conflict markers - autocmd BufReadPost * - \ match Error "^\([<>|]\)\{7} \@=\|^=\{7}$" + " Jump to last known pos + autocmd BufReadPost * + \ if &filetype !~# 'mail\|^git\|^hg' && line("'\"") >= 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + " Simple highlight conflict markers + autocmd BufReadPost * + \ match Error "^\([<>|]\)\{7} \@=\|^=\{7}$" + endif " Simplify noisy ltag output autocmd BufReadPost quickfix