]> oss.titaniummirror.com Git - smckown/dotfiles.git/blobdiff - vim/vimrc
Have all coX commands report actual command used
[smckown/dotfiles.git] / vim / vimrc
index f5e903ddb18027e663c4cfe90cf869127b97b6e6..ab4b160229d06d0d29f1244438cd0bfdaf3aa039 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -23,6 +23,9 @@ call pathogen#helptags()
 runtime! plugin/sensible.vim
 nnoremap Y Y
 
+" Update wildmenu from sensible defaults
+set wildmode=longest:full,full
+
 " Set the correct font for gvim
 if has("gui_running")
   if has("gui_gtk2")
@@ -316,22 +319,6 @@ nmap <leader>7 <Plug>AirlineSelectTab7
 nmap <leader>8 <Plug>AirlineSelectTab8
 nmap <leader>9 <Plug>AirlineSelectTab9
 
-" Highlight only long lines
-" This solution has two problems:
-" 1. On first file edit, the status bar does not render until a key is pressed
-" 2. When creating new lines the last column isn't known until it's arrived
-"augroup collumnLimit
-"  autocmd!
-"  autocmd BufEnter,WinEnter,FileType scala,java,c,nesc,make
-"        \ highlight CollumnLimit ctermbg=LightGrey guibg=LightGrey
-"  let collumnLimit = 79
-"  let pattern =
-"        \ '\%<' . (collumnLimit+1) . 'v.\%>' . collumnLimit . 'v'
-"  autocmd BufEnter,WinEnter,FileType scala,java,c,nesc,make
-"        \ let w:m1=matchadd('CollumnLimit', pattern, -1)
-"augroup END
-
-" The simpler solution to the above, which generates a column
 if exists('+colorcolumn')
   if v:version >= 703
     " Set color column relative to defined textwidth.
@@ -352,15 +339,13 @@ let g:delimitMate_expand_space = 1
 " cop means to toggle auto pairing
 nnoremap cop :DelimitMateSwitch<CR>
 
-" Rainbow Parenthesis -- off by default but set toggle
-nnoremap co( :RainbowParenthesesToggle<CR>
-
 " Toggle git gutter
 nnoremap cog :GitGutterToggle<CR>
 
-" mkbuild tools
-nnoremap <silent> <leader>e :call mkbuild#DmenuOpen('e')<CR>
-nnoremap <leader>x :<C-u>Unite -buffer-name=xrefs xrefs<cr>
+" mkbuild code search tools
+nnoremap <leader>e :<C-u>Unite -start-insert -buffer-name=files mkbuild/file_xref<CR>
+nnoremap <leader>E :<C-u>Unite -start-insert -buffer-name=files mkbuild/file<CR>
+nnoremap <leader>x :<C-u>Unite -buffer-name=xrefs mkbuild/xref<cr>
 
 " Turn on doxygen syntax highlighting for C, C++, C# and IDL files.
 let g:load_doxygen_syntax=1
@@ -387,10 +372,10 @@ function! ToggleFormatOptionT()
   let tmp = substitute(&formatoptions, 't', '', '')
   if &formatoptions == tmp
     set fo+=t
-    :echo "Enable text wrap"
+    :echo ":set fo+=t"
   else
     set fo-=t
-    :echo "Disable text wrap"
+    :echo ":set fo-=t"
   endif
 endfunction
 
@@ -400,10 +385,10 @@ function! ToggleFormatOptionA()
   let tmp = substitute(&formatoptions, 'a', '', '')
   if &formatoptions == tmp
     set fo+=a
-    :echo "Enable auto-wrap paragraphs"
+    :echo ":set fo+=a"
   else
     set fo-=a
-    :echo "Disable auto-wrap paragraphs"
+    :echo ":set fo-=a"
   endif
 endfunction
 
@@ -424,8 +409,10 @@ nnoremap <leader>uy :<C-u>Unite -no-split -buffer-name=yank history/yank<cr>
 nnoremap <leader>ub :<C-u>Unite -no-split -start-insert -buffer-name=buffer buffer<cr>
 nnoremap <leader>uo :<C-u>Unite -no-split -start-insert -buffer-name=outline outline<cr>
 nnoremap <leader>ul :<C-u>Unite -no-split -start-insert -buffer-name=lines line<cr>
-nnoremap <leader>: :<C-u>Unite -start-insert -direction=dynamicbottom -buffer-name=command history/command<cr>
-nnoremap <leader>/ :<C-u>Unite -start-insert -direction=dynamicbottom -buffer-name=search history/search<cr>
+nnoremap <leader>uc :<C-u>Unite -no-split -start-insert -buffer-name=quicklist qf<cr>
+nnoremap <leader>ut :<C-u>Unite -no-split -start-insert -buffer-name=tags tag<cr>
+nnoremap <leader>: :<C-u>Unite -start-insert -buffer-name=command history/command<cr>
+nnoremap <leader>/ :<C-u>Unite -start-insert -buffer-name=search history/search<cr>
 
 " Custom mappings for the unite buffer
 autocmd FileType unite call s:unite_settings()