VIM: использование FuzzyFinder, подсказки, глюки - как можно использовать этот плагин?

http://www.vim.org/scripts/script.php?script_id=1984

Можно запустить FuzzyFinder следующими командами:

     Command           Mode ~
    |:FufBuffer|     - Buffer mode (|fuf-buffer-mode|)
    |:FufFile|       - File mode (|fuf-file-mode|)
    |:FufDir|        - Directory mode (|fuf-dir-mode|)
    |:FufMruFile|    - MRU-File mode (|fuf-mrufile-mode|)
    |:FufMruCmd|     - MRU-Command mode (|fuf-mrucmd-mode|)
    |:FufBookmark|   - Bookmark mode (|fuf-bookmark-mode|)
    |:FufTag|        - Tag mode (|fuf-tag-mode|)
    |:FufTaggedFile| - Tagged-File mode (|fuf-taggedfile-mode|)
    |:FufJumpList|   - Jump-List mode (|fuf-jumplist-mode|)
    |:FufChangeList| - Change-List mode (|fuf-changelist-mode|)
    |:FufQuickfix|   - Quickfix mode (|fuf-quickfix-mode|)
    |:FufLine|       - Line mode (|fuf-line-mode|)
    |:FufHelp|       - Help mode (|fuf-help-mode|)

Таким образом, я просто недавно узнал о FuzzyFinder. Для кого-либо, кто использовал это для вполне некоторое время, можно ли продемонстрировать, как Вы на самом деле используете эти команды в комбинации, какие-либо отображения, которые Вы делаете, какие-либо глюки, которые нужно знать при использовании этого?

24
задан meder omuraliev 12 December 2009 в 20:29
поделиться

1 ответ

FuzzyFinder on itself is pretty useless to me. I use it in combination with FuzzyFinder-TextMate and a Ruby library that traverses all files and subdirectories to find a file, much like the Cmd+T option for TextMate on a Mac. You can see it in action here.

Unfortunately, it takes some effort to get it to work since the original author stopped maintaining the script. There are still some people regularly posting updates to github though. You will need two scripts, fuzzyfinder_textmate.vim and fuzzy_file_finder.rb.

The latest versions work without a problem in combination with Vim FuzzyFinder 2.22.3. Your Vim has to be compiled with Ruby support otherwise it will not work. The blog of the original author contains more information on how to use it properly. Alternatively, have a look at my Vim setup to see how it can be used. The setup defines two keymappings ,s and ,e to fuzzy find a file and open it in a new window or the current window respectively:

function IdeFindTextMate()
  let g:FuzzyFinderOptions.Base.key_open = '<CR>'
  let g:FuzzyFinderOptions.Base.key_open_split = '<C-j>'
  exe "FuzzyFinderTextMate"
endfunction

function IdeSplitFindTextMate()
  let g:FuzzyFinderOptions.Base.key_open = '<C-j>'
  let g:FuzzyFinderOptions.Base.key_open_split = '<CR>'
  exe "FuzzyFinderTextMate"
endfunction

let mapleader = ","
map <silent> <leader>e :call IdeFindTextMate()<CR>
map <silent> <leader>s :call IdeSplitFindTextMate()<CR>

Update:

Right now I use the excellent Command-T plugin instead of FuzzyFinder. Have a look at this superuser answer of mine for the reasons why.

13
ответ дан 28 November 2019 в 23:25
поделиться
Другие вопросы по тегам:

Похожие вопросы: