From 6552de5accb651a5c0436bb77e97cffd93c6a72b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 Nov 2017 13:50:33 +1300 Subject: Remove null command from b:undo_* variables I didn't realise that a null command at the front of .e.g '|cmd|cmd2' printed the current line! Removed that. --- vim/ftplugin/html.vim | 4 ++-- vim/ftplugin/perl.vim | 4 ++-- vim/ftplugin/sh.vim | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vim/ftplugin/html.vim b/vim/ftplugin/html.vim index 27b38424..d2c6a3e3 100644 --- a/vim/ftplugin/html.vim +++ b/vim/ftplugin/html.vim @@ -30,7 +30,7 @@ nnoremap \ :call UrlLink() " Unload this filetype plugin -let b:undo_user_ftplugin = '' - \ . '|silent! nunmap c' +let b:undo_user_ftplugin + \ = 'silent! nunmap c' \ . '|silent! nunmap t' \ . '|silent! nunmap r' diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim index 7f6eb7fe..0db8d1ab 100644 --- a/vim/ftplugin/perl.vim +++ b/vim/ftplugin/perl.vim @@ -14,7 +14,7 @@ nnoremap \ :%!perltidy " Unload this filetype plugin -let l:undo_user_ftplugin = '' - \ . '|silent! unmap c' +let l:undo_user_ftplugin + \ = 'silent! unmap c' \ . '|silent! unmap l' \ . '|silent! unmap t' diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index a8c94445..61d2994d 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.vim @@ -46,8 +46,8 @@ nnoremap \ :execute b:sh_lint " Unload this filetype plugin -let b:undo_user_ftplugin = '' - \ . '|setlocal keywordprg<' +let b:undo_user_ftplugin + \ = 'setlocal keywordprg<' \ . '|unlet! b:sh_check b:sh_lint' \ . '|silent! unmap c' \ . '|silent! unmap l' -- cgit v1.2.3 From 6a5c86738c85296e0b8393dac7ce58285fa85149 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 Nov 2017 13:51:32 +1300 Subject: Use "nunmap" not "unmap" for b:undo_* var We only want to remove the normal mode mapping, since that's all we set. --- vim/ftplugin/perl.vim | 6 +++--- vim/ftplugin/sh.vim | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim index 0db8d1ab..c18653d2 100644 --- a/vim/ftplugin/perl.vim +++ b/vim/ftplugin/perl.vim @@ -15,6 +15,6 @@ nnoremap " Unload this filetype plugin let l:undo_user_ftplugin - \ = 'silent! unmap c' - \ . '|silent! unmap l' - \ . '|silent! unmap t' + \ = 'silent! nunmap c' + \ . '|silent! nunmap l' + \ . '|silent! nunmap t' diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index 61d2994d..60e8b6c4 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.vim @@ -49,5 +49,5 @@ nnoremap let b:undo_user_ftplugin \ = 'setlocal keywordprg<' \ . '|unlet! b:sh_check b:sh_lint' - \ . '|silent! unmap c' - \ . '|silent! unmap l' + \ . '|silent! nunmap c' + \ . '|silent! nunmap l' -- cgit v1.2.3