vimrc: Improved command definitions

Using the trailing '!' means that the file can be sourced without issue.
The comments were also switched to use a more imperative style.
This commit is contained in:
Andrew R. M 2016-10-12 02:54:33 -04:00
parent ed50ab1a18
commit ae995b87d6

24
vimrc
View File

@ -11,23 +11,23 @@ set nocompatible
"{- COMMANDS -}"
" Removes blank lines "
command RemoveBlankLines :g/^\s*$/d
" Remove blank lines "
command! RemoveBlankLines :g/^\s*$/d
" Removes trailing whitespace "
command RemoveTrailingWhitespace :%s/\s\+$//
" Remove trailing whitespace "
command! RemoveTrailingWhitespace :%s/\s\+$//
" Toggles spellchecking "
command Spelling :setlocal spell! spell?
" Toggle spellchecking "
command! Spelling :setlocal spell! spell?
" Toggles invisible characters "
command ShowInvisible :setlocal list!
" Toggle invisible characters "
command! ShowInvisible :setlocal list!
" Toggles cursor crosshair "
command Crosshair :setlocal cursorline! cursorcolumn! ruler
" Toggle cursor crosshair "
command! Crosshair :setlocal cursorline! cursorcolumn! ruler
" Toggles line numbering
command Numbers :setlocal number! relativenumber!
" Toggle line numbering
command! Numbers :setlocal number! relativenumber!
"{- INTERFACE -}"