tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
19.82k stars 1k forks source link

[Question] Look-around branch autocompletion #2294

Open ancientjpeg opened 4 months ago

ancientjpeg commented 4 months ago

Before using Fugitive, I was accustomed to zsh git completion's with an additional matcher statement that allows for branch names to be matched from the middle. This has become incredibly helpful, as my team at work uses Linear's auto-generated branch names, which can be very long and tend to start with a lot of redundant test.

For example, Linear might generate a branch name such as user/eng-4321-branch-name-with-memorable-keyword. In that case, I can do the following in zsh:

git switch memorable <TAB> # autocompletes to full branch name

I'm just wondering if the same matching behavior can be replicated in Fugitive?

Apologies if this has already been addressed—the closest issue I found was #222, but it didn't seem to describe the same thing. I also wasn't able to discern whether or not this was possible from the docs.