From fa2fca2d9d24a830910558056de5b608fc2da517 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 7 Jun 2019 01:11:59 +1200 Subject: Define :Boilerplate command for Perl, no --- vim/after/ftplugin/perl.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim index d1e5dd52..a303fa75 100644 --- a/vim/after/ftplugin/perl.vim +++ b/vim/after/ftplugin/perl.vim @@ -18,9 +18,12 @@ if exists('no_plugin_maps') || exists('no_perl_maps') endif " Add boilerplate intelligently -nnoremap b - \ :call perl#Boilerplate() -let b:undo_ftplugin .= '|nunmap b' +command -buffer Boilerplate + \ call perl#Boilerplate() +nnoremap b + \ :Boilerplate +let b:undo_ftplugin .= '|delcommand Boilerplate' + \ . '|nunmap b' " Mappings to choose compiler nnoremap c -- cgit v1.2.3