mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-15 23:56:53 +08:00
Do not override existing commands
So that we don't have to use VimEnter autocmd to override the commands
This commit is contained in:
@@ -33,7 +33,10 @@ function! s:defs(commands)
|
||||
return
|
||||
endif
|
||||
for command in a:commands
|
||||
execute substitute(command, '\ze\C[A-Z]', prefix, '')
|
||||
let name = ':'.prefix.matchstr(command, '\C[A-Z]\S\+')
|
||||
if !exists(name)
|
||||
execute substitute(command, '\ze\C[A-Z]', prefix, '')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user