参考Vim插件推荐--模糊搜索神器fzf介绍及在Vim中的使用 | vim教程网 (vimjc.com)
junegunn/fzf: A command-line fuzzy finder (github.com)
使用pathegon进行管理,方法为
具体方法为:将仓库git clone到\plugins目录下,在fzf目录下执行命令
系统中安装完 fzf 后便可以在Vim命令行模式使用 :FZF
来列出当前目录下所有的文件,可以通过 Ctrl-k
或 Ctrl-j
来上下移动选择目标文件,也可以使用键盘上下键来进行选择目标文件
oops,还需要装一下这个
junegunn/fzf.vim: fzf vim (github.com)
vim下支持的命令
这些命令都是FZF调用某个工具产生文件,文件内容, tag, comment, command,然后FZF用一个小窗口把它们显示出来,用户就可以用模糊搜索的方式来选择一个或多个选项,按下enter键后就可以用VIM打开它们或跳转到相应的行。
如Files针对的就是文件, GFiles针对的就是git文件
Command | List |
---|---|
Files [PATH] |
普通文件查找 (similar to :FZF ) |
GFiles [OPTS] |
git文件查找 (git ls-files ) |
GFiles? |
git文件查找 (git status ) |
Buffers |
buffer文件切换 |
Colors |
Color schemes |
Ag [PATTERN] |
ag search result (ALT-A to select all, ALT-D to deselect all) |
Lines [QUERY] |
加载的所有buffer里查找 |
BLines [QUERY] |
在当前buffer里查找包含某关键词的行 |
Tags [QUERY] |
以Tag查找 (ctags -R ) |
BTags [QUERY] |
Tags in the current buffer |
Marks |
Marks |
Windows |
Windows |
Locate PATTERN |
locate command output |
History |
v:oldfiles and open buffers |
History: |
命令历史查找 |
History/ |
Search history |
Snippets |
Snippets (UltiSnips) |
Commits |
Git commits (requires fugitive.vim) |
BCommits |
Git commits for the current buffer |
Commands |
Commands |
Maps |
Normal mode mappings |
Helptags |
Help tags 1 |
Filetypes |
File types |