From 7d7443188bf4556929d8803196dc770f8d1dfe14 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 9 Jun 2012 08:42:46 -0500 Subject: [PATCH] .vimrc: Misc key-mapping changes --- .vimrc | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/.vimrc b/.vimrc index 95f243a..ae8d654 100644 --- a/.vimrc +++ b/.vimrc @@ -139,6 +139,8 @@ endif " Mappings " ---------------------------------------------------------------------------- +let mapleader = "," + " to pastetoggle, to turn-off autoindent when pasting from system clipboard nnoremap :set invpaste paste? set pastetoggle= @@ -151,19 +153,12 @@ if version >= 700 nnoremap :sbprevious endif -"" quickfix-window mappings -"map :cn -"map :cp -"map :copen - "" to gundo nnoremap :GundoToggle -"" emacs movement keybindings in insert mode -"imap 0 -"imap $ -"map $ -"map 0 +" disable default vim regex handling for searching +nnoremap / /\v +vnoremap / /\v " reflow paragraph with Q in normal and visual mode nnoremap Q gqap @@ -185,6 +180,12 @@ inoremap gk cnoremap cnoremap +" easier split-window movement +nnoremap h +nnoremap j +nnoremap k +nnoremap l + " ---------------------------------------------------------------------------- " Auto Commands " ---------------------------------------------------------------------------- @@ -225,21 +226,6 @@ endif au Filetype sh,bash set ts=4 sts=4 sw=4 expandtab let g:is_bash = 1 -" --------------------------------------------------------------------------- -" Misc mappings -" --------------------------------------------------------------------------- - -"map ,f :tabnew -"map ,d :e %:h/ -"map ,dt :tabnew %:h/ - -"" I use these commands in my TODO file -"map ,a o:r!date +'\%A, \%B \%d, \%Y':r!date +'\%A, \%B \%d, \%Y' \| sed 's/./-/g'A -"map ,o o[ ] -"map ,O O[ ] -"map ,x :s/^\[ \]/[x]/ -"map ,X :s/^\[x\]/[ ]/ - " --------------------------------------------------------------------------- " Strip all trailing whitespace in file " --------------------------------------------------------------------------- @@ -247,7 +233,7 @@ let g:is_bash = 1 function! StripWhitespace () exec ':%s/ \+$//gc' endfunction -map ,s :call StripWhitespace () +map s :call StripWhitespace () " --------------------------------------------------------------------------- " File Types -- 2.45.2