# HG changeset patch # User Meredith Howard # Date 1462155178 14400 # Node ID 33d6b9519d7eb3ee8a7929c2f02a336d164f0052 # Parent 1a4fddb78f0ef9514265b851685468a9dfbd28cb Add mappings and default magic-free regex, also expand scrolloff diff --git a/.vimrc b/.vimrc --- a/.vimrc +++ b/.vimrc @@ -9,7 +9,6 @@ if has('win32') || has('win64') let on_windows=1 end - " Set up Vundle and plugins {{{ let installed_vundle=0 @@ -74,7 +73,6 @@ end Plugin 'tomtom/tcomment_vim' Plugin 'tpope/vim-unimpaired' Plugin 'tpope/vim-endwise' - " Plugin 'jiangmiao/auto-pairs' Plugin 'vimoutliner/vimoutliner' @@ -91,7 +89,6 @@ end Plugin 'vim-perl/vim-perl' Plugin 'yko/mojo.vim' - try if on_windows == 1 source ~/_vimrc.local-pre @@ -115,13 +112,13 @@ end " }}} -" Key maps, mostly plugin stuff on F-keys {{{ +" Key maps {{{ " F1 - Unite to switch buffers -nmap :Unite -auto-resize -direction=dynamicbottom buffer +nmap :Unite -auto-resize buffer " S-F1 - Unite to switch windows or tabs -nmap :Unite -winheight=10 -quick-match -short-source-names window tab:no-current -nmap :Unite -winheight=10 session +nmap :Unite -quick-match -short-source-names window tab:no-current +nmap :Unite session nmap :VimFilerExplorer map :noh nmap :GundoToggle @@ -152,6 +149,16 @@ nmap j nmap k nmap l +" Prefer using regexes like in code. +map / /\v +map ? ?\v + +" navigate by on-screen lines +map j gj +map k gk +imap j +imap k + " clear all interestingwords with \\k since \K is ri.vim nnoremap k :call UncolorAllWords() @@ -190,7 +197,7 @@ set softtabstop=2 set backspace=indent,eol,start " set number -set scrolloff=4 +set scrolloff=10 set ruler set showcmd set wildmenu @@ -368,6 +375,8 @@ let g:tagbar_type_perl = { call unite#filters#sorter_default#use(['sorter_rank']) " let g:unite_source_history_yank_enable = 1 +call unite#custom#profile('default', 'context', {'winheight': 10}) + if executable('ag') let g:unite_source_grep_command = 'ag' let g:unite_source_grep_default_opts = '--nogroup --nocolor --column' @@ -483,4 +492,3 @@ else end -