diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-05-31 18:04:55 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-05-31 18:04:55 +1200 |
commit | 2fceff8fe5ff7cd0d2282c5f46b448443438e666 (patch) | |
tree | b3d4e67211cb5125ac17d40941336cb23bd78fbe /plugin | |
download | vim-uncap-ex-2fceff8fe5ff7cd0d2282c5f46b448443438e666.tar.gz vim-uncap-ex-2fceff8fe5ff7cd0d2282c5f46b448443438e666.zip |
Initial commitv0.1.0
Copied with minimal changes from tejr's dotfiles suite, v0.36.0.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/uncap_ex.vim | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/plugin/uncap_ex.vim b/plugin/uncap_ex.vim new file mode 100644 index 0000000..978d4b7 --- /dev/null +++ b/plugin/uncap_ex.vim @@ -0,0 +1,45 @@ +" +" uncap_ex.vim: Tolerate typos like :Wq, :Q, or :Qa and do what I mean, +" including any arguments or modifiers; I fat-finger these commands a lot +" because I type them so rapidly, and they don't correspond to any other +" commands I use +" +" Author: Tom Ryder <tom@sanctum.geek.nz> +" License: Same as Vim itself +" +if exists('g:loaded_uncap_ex') || &compatible + finish +endif +if !has('user_commands') + finish +endif +let g:loaded_uncap_ex = 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> |