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 | |
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.
-rw-r--r-- | README.markdown | 14 | ||||
-rw-r--r-- | doc/uncap_ex.txt | 22 | ||||
-rw-r--r-- | plugin/uncap_ex.vim | 45 |
3 files changed, 81 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..359abda --- /dev/null +++ b/README.markdown @@ -0,0 +1,14 @@ +uncap\_ex.vim +============= + +This plugin defines custom commands like `:W`, `:Qa`, and `:Wq` to match their +lowercase analogues, to forgive me when my pinky finger doesn't roll off the +Shift key quite soon enough after pressing the colon key. + +License +------- + +Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself. +See `:help license`. + +[1]: https://sanctum.geek.nz/ diff --git a/doc/uncap_ex.txt b/doc/uncap_ex.txt new file mode 100644 index 0000000..b406227 --- /dev/null +++ b/doc/uncap_ex.txt @@ -0,0 +1,22 @@ +*uncap_ex.txt* For Vim version 7.0 Last change: 2018 May 31 + +DESCRIPTION *uncap_ex* + +This plugin defines custom commands like `:W`, `:Qa`, and `:Wq` to match their +lowercase analogues, to forgive me when my pinky finger doesn't roll off the +Shift key quite soon enough after pressing the colon key. + +REQUIREMENTS *uncap_ex-requirements* + +This plugin is only available if 'compatible' is not set. It also requires the +|+user_cmds| feature. + +AUTHOR *uncap_ex-author* + +Written and maintained by Tom Ryder <tom@sanctum.geek.nz>. + +LICENSE *uncap_ex-license* + +Licensed for distribution under the same terms as Vim itself (see |license|). + + vim:tw=78:ts=8:ft=help:norl: 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> |