Skip to content

add :References command#1607

Closed
bretello wants to merge 2 commits intojunegunn:masterfrom
bretello:add-references-command
Closed

add :References command#1607
bretello wants to merge 2 commits intojunegunn:masterfrom
bretello:add-references-command

Conversation

@bretello
Copy link

@bretello bretello commented Dec 21, 2025

Thanks for the effort in maintaining this extremely useful project and fzf.

I recently contributed to dense-analysis/ale a new feature which allows to search for symbols using :ALEFindReferences and pipe the results into fzf.vim (dense-analysis/ale#5018)

This looks looks something like this:

alefindreferences-fzf
link to asciicast

While I did add some documentation on integration with fzf.vim in ALE's docs here, it might be useful to add the :References command to fzf.vim to invoke the new functionality in ALE. This PR does just that:

  • add :References command to use :ALEFindReferences -fzf
  • doc/fzf-vim.txt: reorder commands in alphabetical order

@bretello bretello changed the title add references command add :References command Dec 21, 2025
| `:Rg [PATTERN]` | [rg][rg] search result (`ALT-A` to select all, `ALT-D` to deselect all) |
| `:RG [PATTERN]` | [rg][rg] search result; relaunch ripgrep on every keystroke |
| `:Lines [QUERY]` | Lines in loaded buffers |
| `:BCommits [LOG_OPTS]` | Git commits for the current buffer; visual-select lines to track changes in the range |
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the noise. This has been reordered in alphabetical order.

| `:Helptags` | Help tags <sup id="a1">[1](#helptags)</sup> |
| `:Filetypes` | File types
| `:Marks` | Marks |
| `:References` | [ALE][ale] `:ALEFindReferences` symbol search result
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only addition in this list, the new :References` command

*:BCommits* *:Commands* *:Maps* *:Helptags* *:Filetypes*
*:Ag* *:BCommits* *:BLines* *:BMarks* *:BTags* *:Buffers* *:Changes* *:Colors* *:Commands*
*:Commits* *:Files* *:Filetypes* *:GFiles* *:Helptags* *:History* *:Jumps* *:Lines*
*:Locate* *:Maps* *:Marks* *:References* *:RG* *:Rg* *:Snippets* *:Tags* *:Windows*
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has also been sorted alphabetically and :References has been added

`:Helptags` | Help tags [1]
`:Filetypes` | File types
`:Marks` | Marks
`:References` | References to the symbol under the cursor (requires {ALE}{12}'s |ALEFindReferences|)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has also been sorted alphabetically and :References has been added

@junegunn
Copy link
Owner

Thanks for sharing, that feature looks pretty neat. But it appears this :References command is only a shortcut for :ALEFindReferences -fzf, right? Adding it here would introduce some additional maintenance burden, since it would need to be kept in sync with upstream changes. Also, users who don't use ALE may not welcome the addition. For these reasons, I don't think it qualifies as a command that should be provided by this plugin.

Happy holidays!

@junegunn junegunn closed this Dec 23, 2025
@bretello bretello deleted the add-references-command branch December 29, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants