commit 95b29b63b5903a5680e5e65b553439a42eeaaa4c parent ddc9bb4c7132492259cddd0831f2780555aa5518 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Thu, 25 Jul 2019 12:49:48 +0200 vim: made ftplugins more robust Former-commit-id: 9d65e21faf80fae5ead0b16ae1b69c95b8aeabfe Diffstat:
M | vim/after/ftplugin/c.vim | | | 5 | +++-- |
M | vim/after/ftplugin/markdown.vim | | | 12 | ++++++------ |
M | vim/after/ftplugin/vimwiki.vim | | | 2 | +- |
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim @@ -1,2 +1,3 @@ -nnoremap <leader>mm :silent make<CR>\|:redraw!<CR>\|:cwindow<CR> -nnoremap <leader>mc :silent make clean<CR>\|:redraw!<CR> +nnoremap <buffer> <leader>mm :silent make<CR>\|:redraw!<CR>\|:cwindow<CR> +nnoremap <buffer> <leader>mc :silent make clean<CR>\|:redraw!<CR> +let b:undo_ftplugin = '' diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim @@ -1,9 +1,9 @@ -inoremap ;1 # -inoremap ;2 ## -inoremap ;3 ### -inoremap ;4 #### -inoremap ;5 ##### -inoremap ;6 ###### +inoremap <buffer> ;1 # +inoremap <buffer> ;2 ## +inoremap <buffer> ;3 ### +inoremap <buffer> ;4 #### +inoremap <buffer> ;5 ##### +inoremap <buffer> ;6 ###### setlocal makeprg=pandoc\ %:p:S\ -o\ %:p:r:S.pdf\ \&\&\ open\ -g\ %:p:r:S.pdf setlocal conceallevel=2 setlocal wrap diff --git a/vim/after/ftplugin/vimwiki.vim b/vim/after/ftplugin/vimwiki.vim @@ -1,3 +1,3 @@ setlocal wrap shiftwidth=4 tabstop=4 softtabstop=4 breakindent breakindentopt=shift:3 -cabbrev table VimwikiTable +cabbrev <buffer> table VimwikiTable let b:undo_ftplugin = '|setlocal wrap< shiftwidth< tabstop< softtabstop< breakindent< breakindentopt<'