Update documentation and comments

This commit is contained in:
Junegunn Choi
2023-01-27 10:42:13 +09:00
parent ca542801a1
commit dc71692255
3 changed files with 60 additions and 60 deletions

View File

@@ -61,32 +61,32 @@ so you can omit it if you use a plugin manager that doesn't support hooks.
Commands Commands
-------- --------
| Command | List | | Command | List |
| --- | --- | | --- | --- |
| `:Files [PATH]` | Files (runs `$FZF_DEFAULT_COMMAND` if defined) | | `:Files [PATH]` | Files (runs `$FZF_DEFAULT_COMMAND` if defined) |
| `:GFiles [OPTS]` | Git files (`git ls-files`) | | `:GFiles [OPTS]` | Git files (`git ls-files`) |
| `: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][ag] search result (`ALT-A` to select all, `ALT-D` to deselect all) | | `:Ag [PATTERN]` | [ag][ag] search result (`ALT-A` to select all, `ALT-D` to deselect all) |
| `:Rg [PATTERN]` | [rg][rg] search result (`ALT-A` to select all, `ALT-D` to deselect all) | | `:Rg [PATTERN]` | [rg][rg] 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`) |
| `:BTags [QUERY]` | Tags in the current buffer | | `:BTags [QUERY]` | Tags in the current buffer |
| `:Marks` | Marks | | `:Marks` | Marks |
| `:Windows` | Windows | | `:Windows` | Windows |
| `:Locate PATTERN` | `locate` command output | | `:Locate PATTERN` | `locate` command output |
| `: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][us]) | | `:Snippets` | Snippets ([UltiSnips][us]) |
| `:Commits` | Git commits (requires [fugitive.vim][f]) | | `:Commits [LOG_OPTS]` | Git commits (requires [fugitive.vim][f]) |
| `:BCommits` | Git commits for the current buffer; visual-select lines to track changes in the range | | `:BCommits [LOG_OPTS]` | Git commits for the current buffer; visual-select lines to track changes in the range |
| `:Commands` | Commands | | `:Commands` | Commands |
| `:Maps` | Normal mode mappings | | `:Maps` | Normal mode mappings |
| `:Helptags` | Help tags <sup id="a1">[1](#helptags)</sup> | | `:Helptags` | Help tags <sup id="a1">[1](#helptags)</sup> |
| `:Filetypes` | File types | `:Filetypes` | File types
- Most commands support `CTRL-T` / `CTRL-X` / `CTRL-V` key - Most commands support `CTRL-T` / `CTRL-X` / `CTRL-V` key
bindings to open in a new tab, a new split, or in a new vertical split bindings to open in a new tab, a new split, or in a new vertical split

View File

@@ -143,7 +143,7 @@ function! s:prepend_opts(dict, eopts)
return s:extend_opts(a:dict, a:eopts, 1) return s:extend_opts(a:dict, a:eopts, 1)
endfunction endfunction
" [[spec to wrap], [preview window expression], [toggle-preview keys...]] " [spec to wrap], [preview window expression], [toggle-preview keys...]
function! fzf#vim#with_preview(...) function! fzf#vim#with_preview(...)
" Default spec " Default spec
let spec = {} let spec = {}
@@ -827,7 +827,7 @@ function! s:ag_handler(lines, has_column)
call s:fill_quickfix(list) call s:fill_quickfix(list)
endfunction endfunction
" query, [[ag options], options] " query, [ag options], [spec (dict)], [fullscreen (bool)]
function! fzf#vim#ag(query, ...) function! fzf#vim#ag(query, ...)
if type(a:query) != s:TYPE.string if type(a:query) != s:TYPE.string
return s:warn('Invalid query argument') return s:warn('Invalid query argument')
@@ -839,7 +839,7 @@ function! fzf#vim#ag(query, ...)
return call('fzf#vim#ag_raw', insert(args, command, 0)) return call('fzf#vim#ag_raw', insert(args, command, 0))
endfunction endfunction
" ag command suffix, [options] " ag command suffix, [spec (dict)], [fullscreen (bool)]
function! fzf#vim#ag_raw(command_suffix, ...) function! fzf#vim#ag_raw(command_suffix, ...)
if !executable('ag') if !executable('ag')
return s:warn('ag is not found') return s:warn('ag is not found')
@@ -847,7 +847,7 @@ function! fzf#vim#ag_raw(command_suffix, ...)
return call('fzf#vim#grep', extend(['ag --nogroup --column --color '.a:command_suffix, 1], a:000)) return call('fzf#vim#grep', extend(['ag --nogroup --column --color '.a:command_suffix, 1], a:000))
endfunction endfunction
" command (string), has_column (0/1), [options (dict)], [fullscreen (0/1)] " command (string), has_column (bool), [spec (dict)], [fullscreen (bool)]
function! fzf#vim#grep(grep_command, has_column, ...) function! fzf#vim#grep(grep_command, has_column, ...)
let words = [] let words = []
for word in split(a:grep_command) for word in split(a:grep_command)
@@ -918,7 +918,7 @@ function! s:btags_sink(lines)
normal! zvzz normal! zvzz
endfunction endfunction
" query, [[tag commands], options] " query, [tag commands], [spec (dict)], [fullscreen (bool)]
function! fzf#vim#buffer_tags(query, ...) function! fzf#vim#buffer_tags(query, ...)
let args = copy(a:000) let args = copy(a:000)
let escaped = fzf#shellescape(expand('%')) let escaped = fzf#shellescape(expand('%'))

View File

@@ -1,4 +1,4 @@
fzf-vim.txt fzf-vim Last change: January 15 2023 fzf-vim.txt fzf-vim Last change: January 27 2023
FZF-VIM - TABLE OF CONTENTS *fzf-vim* *fzf-vim-toc* FZF-VIM - TABLE OF CONTENTS *fzf-vim* *fzf-vim-toc*
============================================================================== ==============================================================================
@@ -112,34 +112,34 @@ COMMANDS *fzf-vim-commands*
*:Windows* *:Locate* *:History* *:Snippets* *:Commits* *:BCommits* *:Commands* *:Maps* *:Windows* *:Locate* *:History* *:Snippets* *:Commits* *:BCommits* *:Commands* *:Maps*
*:Helptags* *:Filetypes* *:Helptags* *:Filetypes*
------------------+-------------------------------------------------------------------------------------- -----------------------+--------------------------------------------------------------------------------------
Command | List ~ Command | List ~
------------------+-------------------------------------------------------------------------------------- -----------------------+--------------------------------------------------------------------------------------
`:Files[PATH]` | Files (runs `$FZF_DEFAULT_COMMAND` if defined) `:Files[PATH]` | Files (runs `$FZF_DEFAULT_COMMAND` if defined)
`:GFiles[OPTS]` | Git files ( `gitls-files` ) `:GFiles[OPTS]` | Git files ( `gitls-files` )
`:GFiles?` | Git files ( `gitstatus` ) `:GFiles?` | Git files ( `gitstatus` )
`:Buffers` | Open buffers `:Buffers` | Open buffers
`:Colors` | Color schemes `:Colors` | Color schemes
`:Ag[PATTERN]` | {ag}{7} search result ( `ALT-A` to select all, `ALT-D` to deselect all) `:Ag[PATTERN]` | {ag}{7} search result ( `ALT-A` to select all, `ALT-D` to deselect all)
`:Rg[PATTERN]` | {rg}{8} search result ( `ALT-A` to select all, `ALT-D` to deselect all) `:Rg[PATTERN]` | {rg}{8} 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` )
`:BTags[QUERY]` | Tags in the current buffer `:BTags[QUERY]` | Tags in the current buffer
`:Marks` | Marks `:Marks` | Marks
`:Windows` | Windows `:Windows` | Windows
`:LocatePATTERN` | `locate` command output `:LocatePATTERN` | `locate` command output
`: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}{9}) `:Snippets` | Snippets ({UltiSnips}{9})
`:Commits` | Git commits (requires {fugitive.vim}{10}) `:Commits[LOG_OPTS]` | Git commits (requires {fugitive.vim}{10})
`:BCommits` | Git commits for the current buffer; visual-select lines to track changes in the range `:BCommits[LOG_OPTS]` | Git commits for the current buffer; visual-select lines to track changes in the range
`:Commands` | Commands `:Commands` | Commands
`:Maps` | Normal mode mappings `:Maps` | Normal mode mappings
`:Helptags` | Help tags [1] `:Helptags` | Help tags [1]
`:Filetypes` | File types `:Filetypes` | File types
------------------+-------------------------------------------------------------------------------------- -----------------------+--------------------------------------------------------------------------------------
*g:fzf_command_prefix* *g:fzf_command_prefix*