First time I’ve ran into this feature (maybe it’s relatively new?) and I thought others might want to know about it.
<tab>
and <s-tab>
work in the prompt buffer for search and selection by cycling alphabetically through all words in the selection. For example if I have the following selected
tango
foxtrot
alpine
giga
apricot tango
treat
and I select, <s>
, split <S>
, search </>
or anything else that brings up a prompt and start hitting tab then it cycles through each word in alphabetical order. Even better it narrows down based on the characters you type, for example if I type in a
then it cycles alpine
, apricot
, giga
, tango
. Type in tr
and it cycles foxtrot
, treat
and back to tr
. Only seems to work with regexes without special characters. Search for [tr]
and press tab and it starts cycling from alpine
.
Anyway, super neat feature which I’ll be using a lot from now on as I always used to do
s[match start of word]<ret>E
to quickly select a word but this method is less error prone as you wont accidently match other words that start with the same characters. Additionally it can save some typing if you have
wordThatIDontWantToSelect
wordThatIWantToSelect
it’s just sw<tab><tab><ret>
rather than swordThatIW<ret>E