# HG changeset patch # User zegervdv # Date 1407863084 -7200 # Node ID 508b8bc6ffd5392dd6578ba237e11c367d0e8fd0 # Parent cdff2a5e45b25023ca7dc4456384e6f04fd378be Improve mapping for split windows diff -r cdff2a5e45b2 -r 508b8bc6ffd5 vimrc --- a/vimrc Tue Aug 12 09:30:55 2014 +0200 +++ b/vimrc Tue Aug 12 19:04:44 2014 +0200 @@ -80,6 +80,7 @@ filetype plugin indent on autocmd FileType ruby set tabstop=2|set shiftwidth=2 +set pastetoggle= set clipboard=unnamed set undofile @@ -106,8 +107,6 @@ \ exe "normal g`\"" | \ endif -nnoremap :buffers:buffer - " Set leader to , let mapleader = "," @@ -155,7 +154,7 @@ " nnoremap ? :execute "Ag! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "","") . "'" " Clear highlight -nnoremap n :nohlsearch +nnoremap :nohl inoremap £ \ @@ -163,13 +162,14 @@ vnoremap % " Move between tabs -nnoremap :tabprevious -nnoremap :tabnext -nnoremap :tabfirst -nnoremap :tablast -nnoremap :tabnew -inoremap :tabprevious -inoremap :tabnext +map w :tabprevious +map m :tabnext + +" Move between splits +map j +map k +map l +map h " highlight last inserted text nnoremap gV `[v`] @@ -191,7 +191,7 @@ endfunction " Highlight matching parenthesis in different color so I don't mess up -hi MatchParen cterm=underline ctermbg=none ctermfg=white gui=underline guifg=white +hi MatchParen cterm=underline ctermbg=none ctermfg=white gui=underline guibg=black guifg=white " Highlight VCS conflict markers match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' @@ -448,12 +448,12 @@ endfunction autocmd FileType unite call s:unite_settings() - nnoremap :Unite -auto-preview -buffer-name=recent file_mru + nnoremap m :Unite -auto-preview -buffer-name=recent file_mru nnoremap y :Unite -buffer-name=yanks history/yank nnoremap l :Unite -start-insert -auto-resize -buffer-name=line line nnoremap b :Unite -auto-resize -buffer-name=buffers buffer nnoremap / :Unite -no-quit -buffer-name=search grep:. - nnoremap m :Unite -auto-resize -buffer-name=mappings mapping + nnoremap k :Unite -auto-resize -buffer-name=mappings mapping nnoremap s :Unite -quick-match buffer nnoremap o :Unite outline nnoremap t :Unite tag