From: R. Steve McKown Date: Sun, 4 Oct 2015 23:20:55 +0000 (-0600) Subject: vim: add unite plugin X-Git-Url: https://oss.titaniummirror.com/gitweb?p=smckown%2Fdotfiles.git;a=commitdiff_plain;h=fa7b2df678cdbd4aa566743b50d5c7ff599c4dcd vim: add unite plugin --- diff --git a/.gitmodules b/.gitmodules index 95f17f5..c5a2c91 100644 --- a/.gitmodules +++ b/.gitmodules @@ -158,3 +158,7 @@ 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 index 0000000..c57bed0 --- /dev/null +++ b/vim/bundle/unite.vim @@ -0,0 +1 @@ +Subproject commit c57bed02229a80d050c2411dff5f0943e6edf08a diff --git a/vim/vimrc b/vim/vimrc index e518667..4c25473 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -410,3 +410,22 @@ endfunction "imap dD =strftime('%Y-%m-%d') "nmap dt "=strftime('%H:%M:%S')p "imap dt =strftime('%H:%M:%S') + +" Unite +let g:unite_source_history_yank_enable = 1 +"call unite#filters#matcher_default#use(['matcher_fuzzy']) +nnoremap uf :Unite -no-split -start-insert -buffer-name=files file_rec +nnoremap uy :Unite -no-split -buffer-name=yank history/yank +nnoremap ub :Unite -no-split -start-insert -buffer-name=buffer buffer + +" 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 (unite_select_next_line) + imap (unite_select_previous_line) + nmap (unite_exit) +endfunction