From a1ee04d02877e1312fa2e7020da658f601551583 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 1 Nov 2017 14:16:19 +1300 Subject: Make 'shellslash' setting conditional on feature :help 'shellslash' says: > 'shellslash' only works when a backslash can be used as a path > separator. To test if this is so use: > if exists('+shellslash') This has actually already been done before in 795fd10, but the change was lost in a merge with a branch that restructured the whole Vim configuration. --- vim/command.vim | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 vim/command.vim diff --git a/vim/command.vim b/vim/command.vim new file mode 100644 index 00000000..af7c8e36 --- /dev/null +++ b/vim/command.vim @@ -0,0 +1,39 @@ +" Keep plenty of command and search history, because disk space is cheap +set history=2000 + +" Always tell me the number of lines changed by a command +set report=0 + +" Command-line based features +if has('cmdline_info') + + " Show my current position in the status bar + set ruler + + " Show the keystrokes being entered in the screen + set showcmd + + " Show the mode we're using if not normal mode (e.g. --INSERT--) + set showmode +endif + +" Always use forward slashes, I very seldom need to use Vim on Windows for +" more than scratch space anyway +if exists('+shellslash') + set shellslash +endif + +" 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 +if has('user_commands') + command! -bang -complete=file -nargs=? E e + command! -bang -complete=file -nargs=? W w + command! -bang -complete=file -nargs=? WQ wq + command! -bang -complete=file -nargs=? Wq wq + command! -bang Q q + command! -bang Qa qa + command! -bang QA qa + command! -bang Wa wa + command! -bang WA wa +endif -- cgit v1.2.3