From 59411bdb16a10793891a603efb88dd2e03635c04 Mon Sep 17 00:00:00 2001 From: jamesmartin Date: Mon, 22 Mar 2010 10:11:15 +1100 Subject: [PATCH] Wrap/nowrap mappings for vim --- vim_files/vimrc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vim_files/vimrc b/vim_files/vimrc index 79d8f63..66272eb 100644 --- a/vim_files/vimrc +++ b/vim_files/vimrc @@ -84,6 +84,8 @@ set hlsearch " highlight search set incsearch " incremental search, search as you type set ignorecase " Ignore case when searching set smartcase " Ignore case when searching lowercase +" JM CTRL-n for toggling search hilighting +:map :set invhlsearch " Colors ********************************************************************** @@ -111,6 +113,9 @@ imap jj imap uu _ imap hh => imap aa @ +" JM - useful to be able to toggle wrapping when writing prose +nnoremap w :set wrap +nnoremap W :set nowrap " Directories ***************************************************************** @@ -202,10 +207,13 @@ function! MakeClean() exec '!scons -c' endfunction +autocmd FileType c set makeprg=scons\ \check +autocmd FileType ruby set makeprg=rake + function! RunTests() silent ! echo exec 'silent ! echo -e "\033 [1,36mRunning tests \033[0m"' - set makeprg=scons\ \check + "set makeprg=scons\ \check silent w exec "make " endfunction @@ -265,7 +273,10 @@ endfunction nnoremap m :call RunTests():redraw:call JumpToError() nnoremap c :call MakeClean() +nnoremap r :exec '!rake' +" JM the JumpToError function acts weird without this +set switchbuf=useopen " ----------------------------------------------------------------------------- " | Plug-ins |