Commits

rride_a committed 0a2bcf2

Shortcuts for using the fuzzy finder and patch for faster fuf directory coverage creation

  • Participants
  • Parent commits 08a5545

Comments (0)

Files changed (2)

 " faster creation of new tabs
 map <C-T> :tabnew<cr>
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Plugin key mappings
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+"" Plugin key mappings
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 "nmap! <Leader>t		:TaskList<CR>
 nmap <Leader>p		:TlistToggle<CR>
 nmap <Leader>nt		:NERDTreeToggle<CR>
 
-nmap <Leader>fu		:FufBuffer<CR>
+
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Fuzzy finder keys
+
 nmap <Leader>ff		:FufFile<CR>
 nmap <Leader>fd		:FufDir<CR>
-nmap <Leader>fb		:FufBookmarkDir<CR>
-nmap <Leader>fa 	:FufBookmarkDirAdd<CR>
+nmap <Leader>fco	:FufCoverageFile<CR>
 
+nmap <Leader>fbu 	:FufBuffer<CR>
 
+nmap <Leader>fbd	:FufBookmarkDir<CR>
+nmap <Leader>fba 	:FufBookmarkDirAdd<CR>
+
+nmap <Leader>fmf    :FufMruFile<CR>
+nmap <Leader>fmc    :FufMruCmd<CR>
+
+nmap <Leader>fta    :FufTag<CR>
+nmap <Leader>fbt    :FufBufferTag<CR>
+nmap <Leader>ftf    :FufTaggedFile<CR>
+
+nmap <Leader>fj     :FufJumpList<CR>
+nmap <Leader>fch    :FufChangeList<CR>
+nmap <Leader>fq     :FufQuickfix<CR>
+nmap <Leader>fl     :FufLine<CR>
+nmap <Leader>fh     :FufHelp<CR>
+
+" turn on MRU and MRU cmds modes by default
+let g:fuf_modesDisable = []   
+let g:fuf_coveragefile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Minibuffer explorer configuration
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 let g:miniBufExplModSelTarget = 1
 "let g:miniBufExplorerMoreThanOne = 1
 
     
     if has("mac")
-        echo "mac"
         au FileType python set keywordprg=~/.scripts/yandex-find.py\ python
     
     elseif !has("win32")

autoload/fuf/coveragefile.vim

   let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_coveragefile_exclude,
         \         g:fuf_coveragefile_globPatterns], "\n")
   if !exists('s:cache[key]')
-    let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns),
-          \                          'fuf#glob(v:val)'))
-    call filter(s:cache[key], 'filereadable(v:val)') " filter out directories
+
+    if has('unix')    
+      let s:cache[key] = split(system(
+            \  "find . -type f | grep -v '\.svn' | grep -v '\.hg/.*\.i$' | grep -v '.*\.swp'"), "\n")
+    else 
+      let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns),
+            \                          'fuf#glob(v:val)'))
+      call filter(s:cache[key], 'filereadable(v:val)') " filter out directories
+    endif
+
     call map(s:cache[key], 'fuf#makePathItem(fnamemodify(v:val, ":~:."), "", 0)')
     if len(g:fuf_coveragefile_exclude)
       call filter(s:cache[key], 'v:val.word !~ g:fuf_coveragefile_exclude')