diff options
| author | Teddy Wing | 2015-10-08 04:40:34 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-10-08 04:40:34 -0400 |
| commit | adf993a8df0f88ab4c51e063f5676e654ff0d0f6 (patch) | |
| tree | 1118f41947537cb43eee1e3e5ba960d8d9af3bb6 | |
| parent | 6c34e91e1800e0deba3054722730ed21b9ff3c18 (diff) | |
| download | vim-space-vlaze-adf993a8df0f88ab4c51e063f5676e654ff0d0f6.tar.bz2 | |
plugin/space_vlaze.vim: Don't create mapping if map already exists
If the user has already defined a mapping for `<leader>sv` then don't
overwrite their mapping.
Also define a `<Plug>` mapping for this for users to map to if so
desired.
| -rw-r--r-- | plugin/space_vlaze.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/space_vlaze.vim b/plugin/space_vlaze.vim index 257f715..7b1c6b3 100644 --- a/plugin/space_vlaze.vim +++ b/plugin/space_vlaze.vim @@ -7,4 +7,8 @@ let g:loaded_space_vlaze = 1 command! SpaceVlaze call space_vlaze#Start() -nnoremap <leader>sv :SpaceVlaze<cr> +nnoremap <silent> <Plug>SpaceVlaze :<c-u>SpaceVlaze<cr> + +if !hasmapto('<Plug>SpaceVlaze') || !maparg('<leader>sv', 'n') + nmap <leader>sv <Plug>SpaceVlaze +endif |
