Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Allow "W" to save a file #20

wants to merge 1 commit into from

2 participants


...kes me retype "w" to save


How would you feel about making a :W command instead of using an abbreviation?

Also, the commit message got messed up. Please stick to the tpope rules; GitHub works best that way:


(If you're not sure how, see :help command for info on making commands.)


It should really be changed to cnoreabbrev W w

Based on:

To leave completion untouched try using cnoreabbrev W w, it will replace W in command line with w but only if it is neither followed nor preceded by word character, so :W will be replaced with :w, but :Write won't.


That replaces the word W with w anywhere on the command line. So, for instance, :!echo W now shows w. That seems like the wrong solution; I'm not sure why it beats the :command solution on SO. Am I missing something?

@jgeiger jgeiger closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 14, 2012
  1. @jgeiger

    Typing quickly, I end up hitting "W" a lot which isn't bound and just…

    jgeiger authored
    … makes me retype "w" to save
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  init/keybindings.vim
3  init/keybindings.vim
@@ -4,6 +4,9 @@
let mapleader = ","
let maplocalleader = ";"
+" have W write as well for shift being held too long
+cabbrev W write
" Make Y consistent with D and C
map Y y$
Something went wrong with that request. Please try again.