diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 22:00:45 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 22:00:45 +1300 |
commit | f1b0f0f30996e1114252bacaf8b170349d61c854 (patch) | |
tree | d15c9665cd9442a3e3d721689cf3675cfae27e6d | |
parent | Move line number .vimrc config into subfile (diff) | |
download | dotfiles-f1b0f0f30996e1114252bacaf8b170349d61c854.tar.gz dotfiles-f1b0f0f30996e1114252bacaf8b170349d61c854.zip |
Move command .vimrc config into subfile
A little bit iffy on the grouping here, but it's still better than
having it all lumped in the one file.
-rw-r--r-- | vim/config/command.vim | 33 | ||||
-rw-r--r-- | vim/vimrc | 33 |
2 files changed, 33 insertions, 33 deletions
diff --git a/vim/config/command.vim b/vim/config/command.vim new file mode 100644 index 00000000..1ffe9058 --- /dev/null +++ b/vim/config/command.vim @@ -0,0 +1,33 @@ +" 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 + +" 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<bang> <args> + command! -bang -complete=file -nargs=? W w<bang> <args> + command! -bang -complete=file -nargs=? WQ wq<bang> <args> + command! -bang -complete=file -nargs=? Wq wq<bang> <args> + command! -bang Q q<bang> + command! -bang Qa qa<bang> + command! -bang QA qa<bang> + command! -bang Wa wa<bang> + command! -bang WA wa<bang> +endif @@ -41,18 +41,6 @@ if has('file_in_path') set path=** endif -" 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 - " Don't try to complete strings from included files, just use the strings in " the open buffers; I'll open the file if I want to complete from it set complete-=i @@ -66,9 +54,6 @@ set fileformats+=mac " to it; note that it wipes out your z mark, if you happen to use it nnoremap J mzJ`z -" Keep plenty of command and search history, because disk space is cheap -set history=2000 - " Try to run the version of matchit.vim included in the distribution, if there " is one; extends % to match more than it does by default silent! runtime macros/matchit.vim @@ -92,9 +77,6 @@ set nomodeline " zero-padded decimal, so increment and decrement with ^A and ^X on that basis set nrformats-=octal -" Always tell me the number of lines changed by a command -set report=0 - " Always use forward slashes, I very seldom need to use Vim on Windows for " more than scratch space anyway set shellslash @@ -125,21 +107,6 @@ set sidescrolloff=16 nnoremap & :&&<CR> vnoremap & :&&<CR> -" 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<bang> <args> - command! -bang -complete=file -nargs=? W w<bang> <args> - command! -bang -complete=file -nargs=? WQ wq<bang> <args> - command! -bang -complete=file -nargs=? Wq wq<bang> <args> - command! -bang Q q<bang> - command! -bang Qa qa<bang> - command! -bang QA qa<bang> - command! -bang Wa wa<bang> - command! -bang WA wa<bang> -endif - " When in visual block mode, let me move the cursor anywhere in the buffer; " don't restrict me only to regions with text if has('virtualedit') |