diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 09:43:32 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 09:43:32 +1300 |
commit | 62d652645dbe31f2e476a7bdcde18ba22445d555 (patch) | |
tree | 1a0ebbde63057f4b9d3354440b661a6271129921 /vim/plugin/command_typos.vim | |
parent | Make background detection return not set value (diff) | |
download | dotfiles-62d652645dbe31f2e476a7bdcde18ba22445d555.tar.gz dotfiles-62d652645dbe31f2e476a7bdcde18ba22445d555.zip |
Don't overwrite plugin-specified user commands
The Google Vimscript Style Guide says:
<https://google.github.io/styleguide/vimscriptguide.xml#Commands>
> Excluding [!] prevents your plugin from silently clobbering existing
> commands. Command conflicts should be resolved by the user.
This makes sense to me as we can think of <Plug> mapping and user
commands as being the user-accessible portion of the interface, rather
than the functions which can be properly namespaced with
autoload#Syntax(), if exposed at all.
Diffstat (limited to 'vim/plugin/command_typos.vim')
-rw-r--r-- | vim/plugin/command_typos.vim | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vim/plugin/command_typos.vim b/vim/plugin/command_typos.vim index 16ba654d..adf2d0eb 100644 --- a/vim/plugin/command_typos.vim +++ b/vim/plugin/command_typos.vim @@ -14,30 +14,30 @@ endif let g:loaded_command_typos = 1 " Define commands -command! -bang -complete=file -nargs=? +command -bang -complete=file -nargs=? \ E \ edit<bang> <args> -command! -bang -complete=file -nargs=? +command -bang -complete=file -nargs=? \ W \ write<bang> <args> -command! -bang -complete=file -nargs=? +command -bang -complete=file -nargs=? \ WQ \ wq<bang> <args> -command! -bang -complete=file -nargs=? +command -bang -complete=file -nargs=? \ Wq \ wq<bang> <args> -command! -bang +command -bang \ Q \ quit<bang> -command! -bang +command -bang \ Qa \ qall<bang> -command! -bang +command -bang \ QA \ qall<bang> -command! -bang +command -bang \ Wa \ wall<bang> -command! -bang +command -bang \ WA \ wa<bang> |