diff --git a/vimrc b/vimrc index e8c545d..0951e0f 100644 --- a/vimrc +++ b/vimrc @@ -136,29 +136,27 @@ let g:snips_author = 'Eryn Wells ' " set the Gundo preview window on the bottom let g:gundo_preview_bottom = 1 -map :NERDTreeToggle -map :GundoToggle -map :setlocal invlist +noremap :NERDTreeToggle +noremap :GundoToggle +noremap :setlocal invlist -inoremap jj +inoremap kj " allow starting commands with ; instead of : nnoremap ; : " tab to skip between braces and such in normal -nnoremap % -vnoremap % +nnoremap % +vnoremap % " disable the help key! -inoremap -nnoremap -vnoremap +noremap " make switching windows easier -nnoremap h -nnoremap j -nnoremap k -nnoremap l +nnoremap h +nnoremap j +nnoremap k +nnoremap l " Usual EMACS (oh the horror!) begin-line and end-line keys for first and last " buffer. @@ -226,39 +224,36 @@ endfunction let mapleader=',' +" hide search terms +nnoremap :setlocal invhlsearch +" find all +nnoremap fa :%s/\v + " strip all trailing whitespace in the current file nnoremap W :call strip_trailing_whitespace() -" Source .vimrc and project.vim files -nmap V :source $MYVIMRC -nmap P :call SourceProjectFile() -" Edit my .vimrc and project.vim files -nmap eV :edit $MYVIMRC -nmap eP :exec 'edit ' . GetProjectFile() +" Source .vimrc +nnoremap sv :source $MYVIMRC -" hide search terms -nmap :setlocal invhlsearch -" find all -nmap fa :%s/\v - -" Open the snippet file for the current filetype -nmap esn :e ~/.vim/bundle/snipmate-snippets/snippets/=&filetype.snippets -" Open the ftplugin-after script for the current filetype -nmap eft :e ~/.vim/after/ftplugin/=&filetype.vim +" Edit my .vimrc +nnoremap ev :split $MYVIMRC +" Edit the snippet file for the current filetype +nnoremap es :e ~/.vim/bundle/snipmate-snippets/snippets/=&filetype.snippets +" Edit the ftplugin-after script for the current filetype +nnoremap ef :e ~/.vim/after/ftplugin/=&filetype.vim " Toggle position highlighting -nmap cl :setlocal invcursorline -nmap cc :setlocal invcursorcolumn - +nnoremap cl :setlocal invcursorline +nnoremap cc :setlocal invcursorcolumn " Text bubbling (these depend on tpope's unimpaired plugin) -nmap [e -nmap ]e -vmap [egv -vmap ]egv +nnoremap [e +nnoremap ]e +vnoremap [egv +vnoremap ]egv " Select last edited text after cut and paste -nmap gV `[v`] +nnoremap gV `[v`] " Command-T should open files in tabs when I hit ; move opening files in @@ -267,9 +262,9 @@ nmap gV `[v`] "let g:CommandTAcceptSelectionTabMap='' " GitGutter shows changed lines in files. -let g:gitgutter_enabled = 0 -highlight clear SignColumn -nmap gg :ToggleGitGutter +"let g:gitgutter_enabled = 0 +"highlight clear SignColumn +"nmap gg :ToggleGitGutter if has('autocmd') filetype plugin indent on