From 1e845312f6396cad8bf7d3c9bb2a83f353438832 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 1 Jul 2018 23:48:54 +1200 Subject: Add \m, \M, \v, and \V mappings For listing maps and variables. --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index c4f6c2dd..f322c191 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -234,6 +234,10 @@ nnoremap i :set incsearch! incsearch? nnoremap j :buffers:buffer " \l toggles showing tab, end-of-line, and trailing whitespace nnoremap l :set list! list? +" \m shows all maps +nnoremap m :map +" \M shows buffer-local maps +nnoremap M :map " \n toggles line numbers nnoremap n :set number! number? " \o and \O open 'pasted insert' lines @@ -249,6 +253,10 @@ nnoremap s :setlocal spell! spell? nnoremap t :set filetype? " \u sets US English spelling (compare \z) nnoremap u :setlocal spelllang=en_us spelllang? +" \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 :set wrap! wrap? " \x strips trailing whitespace via a custom plugin -- cgit v1.2.3