mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-14 20:57:05 +08:00
Avoid remapping of temporary <Plug> map
This commit is contained in:
6
plug.vim
6
plug.vim
@@ -115,8 +115,10 @@ function! plug#end()
|
|||||||
let commands = type(plug.on) == 1 ? [plug.on] : plug.on
|
let commands = type(plug.on) == 1 ? [plug.on] : plug.on
|
||||||
for cmd in commands
|
for cmd in commands
|
||||||
if cmd =~ '^<Plug>.\+'
|
if cmd =~ '^<Plug>.\+'
|
||||||
execute printf(
|
if empty(mapcheck(cmd))
|
||||||
\ "noremap %s :call <SID>lod_map(%s, %s)<CR>", cmd, string(cmd), string(plug))
|
execute printf(
|
||||||
|
\ "noremap %s :call <SID>lod_map(%s, %s)<CR>", cmd, string(cmd), string(plug))
|
||||||
|
endif
|
||||||
elseif !exists(':'.cmd)
|
elseif !exists(':'.cmd)
|
||||||
execute printf(
|
execute printf(
|
||||||
\ "command! -nargs=* -bang %s call s:lod_cmd(%s, '<bang>', <q-args>, %s)",
|
\ "command! -nargs=* -bang %s call s:lod_cmd(%s, '<bang>', <q-args>, %s)",
|
||||||
|
|||||||
Reference in New Issue
Block a user