aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/command_typos.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-05 00:41:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-05 00:41:40 +1300
commit2044d97b03c31083cc0bb47a3f65d729d98f558b (patch)
treef41874a69203faf1f1e5780925b06e84310a9eeb /vim/plugin/command_typos.vim
parentMerge branch 'release/v0.7.0' (diff)
parentBump version number to 0.8.0 (diff)
downloaddotfiles-0.8.0.tar.gz (sig)
dotfiles-0.8.0.zip
Merge branch 'release/v0.8.0'v0.8.0
* release/v0.8.0: Bump version number to 0.8.0 Use BufReadPost hook for big_file_options.vim Limit search highlighting hooks to Vim >= 7.1 Add explanatory note for choosing imperfect remap Set 'guioptions' flag by flag Use variable setting approach for 'guifont' Add short-circuit boilerplate to plugins Simplify shell linting code with single vars Use spaces around concat dots in VimL consistently Remove vim/bundle/html5 submodule Remove vim/bundle/targets submodule Adjust plugin code layout a lot
Diffstat (limited to 'vim/plugin/command_typos.vim')
-rw-r--r--vim/plugin/command_typos.vim44
1 files changed, 34 insertions, 10 deletions
diff --git a/vim/plugin/command_typos.vim b/vim/plugin/command_typos.vim
index 32d194fb..16ba654d 100644
--- a/vim/plugin/command_typos.vim
+++ b/vim/plugin/command_typos.vim
@@ -6,14 +6,38 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if has('eval') && has('user_commands')
- command! -bang -complete=file -nargs=? E e<bang> <args>
- command! -bang -complete=file -nargs=? W w<bang> <args>
- command! -bang -complete=file -nargs=? WQ wq<bang> <args>
- command! -bang -complete=file -nargs=? Wq wq<bang> <args>
- command! -bang Q q<bang>
- command! -bang Qa qa<bang>
- command! -bang QA qa<bang>
- command! -bang Wa wa<bang>
- command! -bang WA wa<bang>
+if exists('g:loaded_command_typos')
+ \ || !has('user_commands')
+ \ || &compatible
+ finish
endif
+let g:loaded_command_typos = 1
+
+" Define commands
+command! -bang -complete=file -nargs=?
+ \ E
+ \ edit<bang> <args>
+command! -bang -complete=file -nargs=?
+ \ W
+ \ write<bang> <args>
+command! -bang -complete=file -nargs=?
+ \ WQ
+ \ wq<bang> <args>
+command! -bang -complete=file -nargs=?
+ \ Wq
+ \ wq<bang> <args>
+command! -bang
+ \ Q
+ \ quit<bang>
+command! -bang
+ \ Qa
+ \ qall<bang>
+command! -bang
+ \ QA
+ \ qall<bang>
+command! -bang
+ \ Wa
+ \ wall<bang>
+command! -bang
+ \ WA
+ \ wa<bang>