From 2fceff8fe5ff7cd0d2282c5f46b448443438e666 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 31 May 2018 18:04:55 +1200 Subject: Initial commit Copied with minimal changes from tejr's dotfiles suite, v0.36.0. --- README.markdown | 14 ++++++++++++++ doc/uncap_ex.txt | 22 ++++++++++++++++++++++ plugin/uncap_ex.vim | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 README.markdown create mode 100644 doc/uncap_ex.txt create mode 100644 plugin/uncap_ex.vim 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 . + +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 +" 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 +command -bang -complete=file -nargs=? + \ W + \ write +command -bang -complete=file -nargs=? + \ WQ + \ wq +command -bang -complete=file -nargs=? + \ Wq + \ wq +command -bang + \ Q + \ quit +command -bang + \ Qa + \ qall +command -bang + \ QA + \ qall +command -bang + \ Wa + \ wall +command -bang + \ WA + \ wa -- cgit v1.2.3