vim-fzf-tjump is a Vim plugin designed as an alternative to Vim’s built-in :tjump command. It leverages fzf to filter tag candidates interactively, allowing you to quickly jump to the desired tag with ease.
vim-fzf-tjump-demo.mp4
- Interactive Filtering: Use fzf to filter tag candidates in real-time.
- Code Preview: Preview the code of the selected tag before jumping.
- Efficient Navigation: Automatically jump directly if only one matching tag is found.
" Call without any arguments
call fzf_tjump#jump()
" Call with a tag name
call fzf_tjump#jump(some_tag_name)
" Call with a tag name and an exit callback
call fzf_tjump#jump(some_tag_name, { "exit": { status -> execute(...) } })Displays tag candidates that match the given tag name and jumps to the selected tag. If only one matching tag is found, it jumps directly.
- Arguments:
- If no argument is provided or the given tag name is an empty string, the current word (
<cword>) is used as the tag name. - You can specify an
exitoption for the exit callback. The callback is called when the fzf window is closed.
- If no argument is provided or the given tag name is an empty string, the current word (
- Preview: Shows a code preview of the selected tag.
A wrapper for the fzf_tjump#jump() function.
- Respects the
g:fzf_command_prefixsetting. For example, the command name becomes:FzfTjumpif you configure as following:
let g:fzf_command_prefix = "Fzf"vim-fzf-tjump adds no default mappings. You can add your own mappings as needed.
" Press `g]` in normal mode to call `fzf_tjump#jump`.
" Press `g]` in visual mode to call `fzf_tjump#jump` with the selected word.
map g] <Plug>(fzf-tjump)For more information on available configuration options, execute:
:h vim-fzf-tjump-variablesIf you use dein.vim:
call dein#add("kg8m/vim-fzf-tjump")