aboutsummaryrefslogblamecommitdiff
path: root/vim/plugin/command_typos.vim
blob: 6f46b11554ab0dfed77e0bb3cf6c3ed85d3dfe93 (plain) (tree)
1
2
3
4
5
6
7
8
9
 


                                                                          



                                         
                                      



























                                        
     
"
" 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 has('eval') && has('user_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>
endif