From df20e9f89aea2780fe2b91a4c3c47570fdb0e7cf Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 Feb 2012 17:40:07 +1300 Subject: Added feature check wrapper to user commands. --- vim/vimrc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'vim/vimrc') 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 -command! -bang -nargs=? -complete=file W w -command! -bang -nargs=? -complete=file Wq wq -command! -bang -nargs=? -complete=file WQ wq -command! -bang Wa wa -command! -bang WA wa -command! -bang Q q -command! -bang QA qa -command! -bang Qa qa +if has("user_commands") + command! -bang -nargs=? -complete=file E e + command! -bang -nargs=? -complete=file W w + command! -bang -nargs=? -complete=file Wq wq + command! -bang -nargs=? -complete=file WQ wq + command! -bang Wa wa + command! -bang WA wa + command! -bang Q q + command! -bang QA qa + command! -bang Qa qa +endif " Unmaps noremap -- cgit v1.2.3