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/toggle_option_flag.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/toggle_option_flag.vim')
-rw-r--r-- | vim/plugin/toggle_option_flag.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim index f8dcd3a9..2543b8c3 100644 --- a/vim/plugin/toggle_option_flag.vim +++ b/vim/plugin/toggle_option_flag.vim @@ -46,9 +46,9 @@ function! s:Toggle(option, flag, local) endfunction " User commands wrapping around calls to the above function -command! -nargs=+ -complete=option +command -nargs=+ -complete=option \ ToggleOptionFlag \ call <SID>Toggle(<f-args>, 0) -command! -nargs=+ -complete=option +command -nargs=+ -complete=option \ ToggleOptionFlagLocal \ call <SID>Toggle(<f-args>, 1) |