From ca7bc38ec1d4a9f8be4a22fb2c3404271d7d4738 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 23 Aug 2018 14:45:22 +1200 Subject: Add vertical spacing to leader maps section --- vim/vimrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index a3d4ede4..a8af3905 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -251,8 +251,10 @@ nmap ] (PutBlankLinesBelow) " \a toggles 'formatoptions' 'a' flag using a plugin nnoremap a :ToggleFlagLocal formatoptions a + " \b toggles copy-pasteable linebreak settings nmap b (CopyLinebreakToggle) + " \c toggles 'cursorline' nnoremap c :setlocal cursorline! cursorline? " \C toggles 'cursorcolumn' @@ -260,37 +262,50 @@ nnoremap C :setlocal cursorcolumn! cursorcolumn? if exists(':xnoremap') xnoremap C :setlocal cursorcolumn! cursorcolumn?gv endif + " \d inserts the local date (POSIX date) nnoremap d :read !date " \D inserts the UTC date (POSIX date) nnoremap D :read !date -u + " \e forces a buffer to be editable nnoremap e :setlocal modifiable noreadonly + " \f shows the current 'formatoptions' at a glance nnoremap f :setlocal formatoptions? + " \F reloads filetype nnoremap F :doautocmd filetypedetect BufRead + " \g changes directory to the current file's location nnoremap g :cd %:h:pwd + " \h toggles highlighting search results nnoremap h :set hlsearch! hlsearch? + " \H shows command history nnoremap H :history : + " \i toggles showing matches as I enter my pattern nnoremap i :set incsearch! incsearch? + " \j jumps to buffers (jetpack) nnoremap j :buffers:buffer + " \k shows my marks nnoremap k :marks + " \l toggles showing tab, end-of-line, and trailing whitespace nnoremap l :setlocal list! list? if exists(':xnoremap') xnoremap l :setlocal list! list?gv endif + " \m shows normal maps nnoremap m :map " \M shows buffer-local normal maps nnoremap M :map + " \n toggles line numbers nnoremap n :setlocal number! number? if exists(':xnoremap') @@ -301,45 +316,58 @@ nnoremap N :set ruler! ruler? if exists(':xnoremap') xnoremap N :set ruler! ruler?gv endif + " \o opens a line below in paste mode nmap o (PasteOpenBelow) " \O opens a line above in paste mode nmap O (PasteOpenAbove) + " \p toggles paste mode nnoremap p :set paste! paste? + " \q formats the current paragraph nnoremap q gqap + " \r acts as a replacement operator nmap r (ReplaceOperator) if exists(':xmap') xmap r (ReplaceOperator) endif + " \R reloads ~/.vimrc nnoremap R :source $MYVIMRC + " \s toggles spell checking nnoremap s :setlocal spell! spell? + " \t shows current filetype nnoremap t :setlocal filetype? " \T clears filetype (follow with \R) nnoremap T :setlocal filetype= + " \u sets US English spelling (compare \z) nnoremap u :setlocal spelllang=en_us + " \v shows all global variables nnoremap v :let g: v: " \V shows all local variables nnoremap V :let b: t: w: + " \w toggles wrapping nnoremap w :setlocal wrap! wrap? if exists(':xnoremap') xnoremap w :setlocal wrap! wrap?gv endif + " \x strips trailing whitespace via a custom plugin nmap x :StripTrailingWhitespace if exists(':xmap') xmap x :StripTrailingWhitespace endif + " \y shows all registers nnoremap y :registers + " \z sets NZ English spelling (compare \u) nnoremap z :setlocal spelllang=en_nz -- cgit v1.2.3