From ae995b87d60e35a7298ae4ed3bd54b549a1e13e6 Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Wed, 12 Oct 2016 02:54:33 -0400 Subject: [PATCH] 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. --- vimrc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vimrc b/vimrc index dd3d67c..ddcd36b 100644 --- a/vimrc +++ b/vimrc @@ -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 -}"