aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin/vim')
-rw-r--r--vim/after/ftplugin/vim/maps.vim (renamed from vim/after/ftplugin/vim/clear_maps.vim)22
1 files changed, 11 insertions, 11 deletions
diff --git a/vim/after/ftplugin/vim/clear_maps.vim b/vim/after/ftplugin/vim/maps.vim
index a84ca4b9..7f2a07a0 100644
--- a/vim/after/ftplugin/vim/clear_maps.vim
+++ b/vim/after/ftplugin/vim/maps.vim
@@ -1,5 +1,4 @@
-" vim/clear_maps.vim: Fix clearing buffer-local vim maps that the core
-" ftplugin leaves in place
+" vim/maps.vim: tejr's mappings for 'vim' filetypes
" Don't load if running compatible or too old
if &compatible || v:version < 700
@@ -7,21 +6,22 @@ if &compatible || v:version < 700
endif
" Don't load if already loaded
-if exists('b:did_ftplugin_vim_lint')
- finish
-endif
-
-" Don't load if the mappings probably weren't loaded in the first place
-if exists('g:no_plugin_maps') || exists('g:no_vim_maps')
+if exists('b:did_ftplugin_vim_maps')
finish
endif
" Flag as loaded
-let b:did_ftplugin_vim_clear_maps = 1
+let b:did_ftplugin_vim_maps = 1
let b:undo_ftplugin = b:undo_ftplugin
- \ . '|unlet b:did_ftplugin_vim_clear_maps'
+ \ . '|unlet b:did_ftplugin_vim_maps'
-" Add undo commands
+" Set mappings
+nmap <buffer> <LocalLeader>l <Plug>VimLint
+let b:undo_ftplugin = b:undo_ftplugin
+ \ . '|nunmap <buffer> <LocalLeader>l'
+
+" Add undo commands to fix clearing buffer-local vim maps that the core
+" ftplugin leaves in place
let b:undo_ftplugin = b:undo_ftplugin
\ . '|silent! nunmap <buffer> [['
\ . '|silent! vunmap <buffer> [['