]> oss.titaniummirror.com Git - smckown/dotfiles.git/commitdiff
vim: add unite plugin
authorR. Steve McKown <rsmckown@gmail.com>
Sun, 4 Oct 2015 23:20:55 +0000 (17:20 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 5 Oct 2015 03:35:32 +0000 (21:35 -0600)
.gitmodules
vim/bundle/unite.vim [new submodule]
vim/vimrc

index 95f17f567fd86c24fbcdb81deecb94877e7c2fa3..c5a2c911a3ba30ef9d60c31a43e9c32a95d15eda 100644 (file)
        path = vim/bundle/vim-dispatch
        url = https://github.com/tpope/vim-dispatch.git
        ignore = untracked
+[submodule "vim/bundle/unite.vim"]
+       path = vim/bundle/unite.vim
+       url = https://github.com/Shougo/unite.vim.git
+       ignore = untracked
diff --git a/vim/bundle/unite.vim b/vim/bundle/unite.vim
new file mode 160000 (submodule)
index 0000000..c57bed0
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit c57bed02229a80d050c2411dff5f0943e6edf08a
index e51866713490dbd8585546f839500d67281d3e6c..4c2547318ce43b0ff74ac46e4e0b74d7224b660c 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -410,3 +410,22 @@ endfunction
 "imap <leader>dD <C-R>=strftime('%Y-%m-%d')<CR>
 "nmap <leader>dt "=strftime('%H:%M:%S')<CR>p
 "imap <leader>dt <C-R>=strftime('%H:%M:%S')<CR>
+
+" Unite
+let g:unite_source_history_yank_enable = 1
+"call unite#filters#matcher_default#use(['matcher_fuzzy'])
+nnoremap <leader>uf :<C-u>Unite -no-split -start-insert -buffer-name=files file_rec<cr>
+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>
+
+" Custom mappings for the unite buffer
+autocmd FileType unite call s:unite_settings()
+function! s:unite_settings()
+  setlocal noswapfile undolevels=-1
+  " Play nice with supertab
+  let b:SuperTabDisabled=1
+  " Enable navigation with control-j and control-k in insert mode
+  imap <buffer> <C-n> <Plug>(unite_select_next_line)
+  imap <buffer> <C-p> <Plug>(unite_select_previous_line)
+  nmap <buffer> <ESC> <Plug>(unite_exit)
+endfunction