mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Dependencies
This commit is contained in:
@@ -48,6 +48,13 @@ Plug 'junegunn/fzf.vim'
|
|||||||
`fzf#install()` makes sure that you have the latest binary, but it's optional,
|
`fzf#install()` makes sure that you have the latest binary, but it's optional,
|
||||||
so you can omit it if you use a plugin manager that doesn't support hooks.
|
so you can omit it if you use a plugin manager that doesn't support hooks.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- For syntax-highlighted preview, install [bat](https://github.com/sharkdp/bat)
|
||||||
|
- `Ag` requires [The Silver Searcher (ag)][ag]
|
||||||
|
- `Rg` requires [ripgrep (rg)][rg]
|
||||||
|
- `Tags` and `Helptags` require Perl
|
||||||
|
|
||||||
Commands
|
Commands
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
fzf-vim.txt fzf-vim Last change: May 3 2020
|
fzf-vim.txt fzf-vim Last change: July 27 2020
|
||||||
FZF-VIM - TABLE OF CONTENTS *fzf-vim* *fzf-vim-toc*
|
FZF-VIM - TABLE OF CONTENTS *fzf-vim* *fzf-vim-toc*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@ FZF-VIM - TABLE OF CONTENTS *fzf-vim* *fzf-vim-to
|
|||||||
Why you should use fzf on Vim
|
Why you should use fzf on Vim
|
||||||
Installation
|
Installation
|
||||||
Using vim-plug
|
Using vim-plug
|
||||||
|
Dependencies
|
||||||
Commands
|
Commands
|
||||||
Customization
|
Customization
|
||||||
Global options
|
Global options
|
||||||
@@ -86,6 +87,19 @@ fzf/Vim integration, see {README-VIM}{4}.
|
|||||||
so you can omit it if you use a plugin manager that doesn't support hooks.
|
so you can omit it if you use a plugin manager that doesn't support hooks.
|
||||||
|
|
||||||
|
|
||||||
|
< Dependencies >______________________________________________________________~
|
||||||
|
*fzf-vim-dependencies*
|
||||||
|
|
||||||
|
- For syntax-highlighted preview, install {bat}{5}
|
||||||
|
- `Ag` requires {The Silver Searcher (ag)}{6}
|
||||||
|
- `Rg` requires {ripgrep (rg)}{7}
|
||||||
|
- `Tags` and `Helptags` require Perl
|
||||||
|
|
||||||
|
{5} https://github.com/sharkdp/bat
|
||||||
|
{6} https://github.com/ggreer/the_silver_searcher
|
||||||
|
{7} https://github.com/BurntSushi/ripgrep
|
||||||
|
|
||||||
|
|
||||||
COMMANDS *fzf-vim-commands*
|
COMMANDS *fzf-vim-commands*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -101,8 +115,8 @@ COMMANDS *fzf-vim-commands*
|
|||||||
`:GFiles?` | Git files ( `git status` )
|
`:GFiles?` | Git files ( `git status` )
|
||||||
`:Buffers` | Open buffers
|
`:Buffers` | Open buffers
|
||||||
`:Colors` | Color schemes
|
`:Colors` | Color schemes
|
||||||
`:Ag [PATTERN]` | {ag}{5} search result ( `ALT-A` to select all, `ALT-D` to deselect all)
|
`:Ag [PATTERN]` | {ag}{6} search result ( `ALT-A` to select all, `ALT-D` to deselect all)
|
||||||
`:Rg [PATTERN]` | {rg}{6} search result ( `ALT-A` to select all, `ALT-D` to deselect all)
|
`:Rg [PATTERN]` | {rg}{7} search result ( `ALT-A` to select all, `ALT-D` to deselect all)
|
||||||
`:Lines [QUERY]` | Lines in loaded buffers
|
`:Lines [QUERY]` | Lines in loaded buffers
|
||||||
`:BLines [QUERY]` | Lines in the current buffer
|
`:BLines [QUERY]` | Lines in the current buffer
|
||||||
`:Tags [QUERY]` | Tags in the project ( `ctags -R` )
|
`:Tags [QUERY]` | Tags in the project ( `ctags -R` )
|
||||||
@@ -113,8 +127,8 @@ COMMANDS *fzf-vim-commands*
|
|||||||
`:History` | `v:oldfiles` and open buffers
|
`:History` | `v:oldfiles` and open buffers
|
||||||
`:History:` | Command history
|
`:History:` | Command history
|
||||||
`:History/` | Search history
|
`:History/` | Search history
|
||||||
`:Snippets` | Snippets ({UltiSnips}{7})
|
`:Snippets` | Snippets ({UltiSnips}{8})
|
||||||
`:Commits` | Git commits (requires {fugitive.vim}{8})
|
`:Commits` | Git commits (requires {fugitive.vim}{9})
|
||||||
`:BCommits` | Git commits for the current buffer
|
`:BCommits` | Git commits for the current buffer
|
||||||
`:Commands` | Commands
|
`:Commands` | Commands
|
||||||
`:Maps` | Normal mode mappings
|
`:Maps` | Normal mode mappings
|
||||||
@@ -130,14 +144,14 @@ COMMANDS *fzf-vim-commands*
|
|||||||
- You can set `g:fzf_command_prefix` to give the same prefix to the commands
|
- You can set `g:fzf_command_prefix` to give the same prefix to the commands
|
||||||
- e.g. `let g:fzf_command_prefix = 'Fzf'` and you have `FzfFiles`, etc.
|
- e.g. `let g:fzf_command_prefix = 'Fzf'` and you have `FzfFiles`, etc.
|
||||||
|
|
||||||
(1: `Helptags` will shadow the command of the same name from {pathogen}{9}.
|
(1: `Helptags` will shadow the command of the same name from {pathogen}{10}.
|
||||||
But its functionality is still available via `call pathogen#helptags()`.)
|
But its functionality is still available via `call pathogen#helptags()`.)
|
||||||
|
|
||||||
{5} https://github.com/ggreer/the_silver_searcher
|
{6} https://github.com/ggreer/the_silver_searcher
|
||||||
{6} https://github.com/BurntSushi/ripgrep
|
{7} https://github.com/BurntSushi/ripgrep
|
||||||
{7} https://github.com/SirVer/ultisnips
|
{8} https://github.com/SirVer/ultisnips
|
||||||
{8} https://github.com/tpope/vim-fugitive
|
{9} https://github.com/tpope/vim-fugitive
|
||||||
{9} https://github.com/tpope/vim-pathogen
|
{10} https://github.com/tpope/vim-pathogen
|
||||||
|
|
||||||
|
|
||||||
CUSTOMIZATION *fzf-vim-customization*
|
CUSTOMIZATION *fzf-vim-customization*
|
||||||
@@ -245,8 +259,8 @@ Want a preview window?
|
|||||||
\ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, <bang>0)
|
\ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, <bang>0)
|
||||||
<
|
<
|
||||||
It kind of works, but you probably want a nicer previewer program than `cat`.
|
It kind of works, but you probably want a nicer previewer program than `cat`.
|
||||||
fzf.vim ships {a versatile preview script}{10} you can readily use. It
|
fzf.vim ships {a versatile preview script}{11} you can readily use. It
|
||||||
internally executes {bat}{11} for syntax highlighting, so make sure to install
|
internally executes {bat}{5} for syntax highlighting, so make sure to install
|
||||||
it.
|
it.
|
||||||
>
|
>
|
||||||
command! -bang -nargs=? -complete=dir Files
|
command! -bang -nargs=? -complete=dir Files
|
||||||
@@ -266,8 +280,8 @@ You can just omit the spec argument if you only want the previewer.
|
|||||||
command! -bang -nargs=? -complete=dir Files
|
command! -bang -nargs=? -complete=dir Files
|
||||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
|
||||||
<
|
<
|
||||||
{10} bin/preview.sh
|
{11} bin/preview.sh
|
||||||
{11} https://github.com/sharkdp/bat
|
{5} https://github.com/sharkdp/bat
|
||||||
|
|
||||||
|
|
||||||
Example: git grep wrapper~
|
Example: git grep wrapper~
|
||||||
@@ -280,7 +294,7 @@ predefined `Ag` or `Rg` using `fzf#vim#grep`.
|
|||||||
not print column numbers.
|
not print column numbers.
|
||||||
- We set the base directory to git root by setting `dir` attribute in spec
|
- We set the base directory to git root by setting `dir` attribute in spec
|
||||||
dictionary.
|
dictionary.
|
||||||
- {The preview script}{10} supports `grep` format (`FILE_PATH:LINE_NO:...`), so
|
- {The preview script}{11} supports `grep` format (`FILE_PATH:LINE_NO:...`), so
|
||||||
we can just wrap the spec with `fzf#vim#with_preview` as before to enable
|
we can just wrap the spec with `fzf#vim#with_preview` as before to enable
|
||||||
previewer.
|
previewer.
|
||||||
>
|
>
|
||||||
@@ -289,7 +303,7 @@ predefined `Ag` or `Rg` using `fzf#vim#grep`.
|
|||||||
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
|
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
|
||||||
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
|
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
|
||||||
<
|
<
|
||||||
{10} bin/preview.sh
|
{11} bin/preview.sh
|
||||||
|
|
||||||
|
|
||||||
Example: Rg command with preview window~
|
Example: Rg command with preview window~
|
||||||
|
|||||||
Reference in New Issue
Block a user