aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-02-14 17:40:07 +1300
committerTom Ryder <tom@sanctum.geek.nz>2012-02-14 17:40:07 +1300
commitdf20e9f89aea2780fe2b91a4c3c47570fdb0e7cf (patch)
tree9243c4bf22d3a01dc523bf6ba33b00bd3e910c10 /vim/vimrc
parentPretty sure this is right. (diff)
downloaddotfiles-df20e9f89aea2780fe2b91a4c3c47570fdb0e7cf.tar.gz
dotfiles-df20e9f89aea2780fe2b91a4c3c47570fdb0e7cf.zip
Added feature check wrapper to user commands.
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc20
1 files changed, 11 insertions, 9 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 33ae5d41..636241b7 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -105,15 +105,17 @@ set ttyfast
set visualbell t_vb=
" Typos
-command! -bang -nargs=? -complete=file E e<bang> <args>
-command! -bang -nargs=? -complete=file W w<bang> <args>
-command! -bang -nargs=? -complete=file Wq wq<bang> <args>
-command! -bang -nargs=? -complete=file WQ wq<bang> <args>
-command! -bang Wa wa<bang>
-command! -bang WA wa<bang>
-command! -bang Q q<bang>
-command! -bang QA qa<bang>
-command! -bang Qa qa<bang>
+if has("user_commands")
+ command! -bang -nargs=? -complete=file E e<bang> <args>
+ command! -bang -nargs=? -complete=file W w<bang> <args>
+ command! -bang -nargs=? -complete=file Wq wq<bang> <args>
+ command! -bang -nargs=? -complete=file WQ wq<bang> <args>
+ command! -bang Wa wa<bang>
+ command! -bang WA wa<bang>
+ command! -bang Q q<bang>
+ command! -bang QA qa<bang>
+ command! -bang Qa qa<bang>
+endif
" Unmaps
noremap <F1> <nop>