command-t icon indicating copy to clipboard operation
command-t copied to clipboard

Previous search query

Open dymv opened this issue 10 years ago • 6 comments

Is there a way to quickly retype previous search query to the Command-T window? Sometimes queries are too long to retype them every time and it'd handy to be able to quickly place previous one or even be able to go back through search history. What do you think?

dymv avatar Mar 05 '15 08:03 dymv

There's no way to do this currently, but I'd be open to a pull request for it. If you were going to implement this, it is probably worth doing it more generally as a history stack than just a single "previous search entry".

wincent avatar Mar 06 '15 15:03 wincent

Just thinking: What about shortcuts (search backwards, forwards):

  • Tab and S-Tab
  • C-e and C-y

dylan-chong avatar Jun 07 '18 19:06 dylan-chong

What’s your mnemonic for those?

wincent avatar Jun 07 '18 20:06 wincent

Not sure. In bash/vim command mode you can use up/down arrows for looking at the history, but in command t that moves around the list of files. I was trying to look for pairs of keys:

  • Tab and S-Tab is for used autocompleting in ides/supertab
  • C-e and C-y is for moving the screen up/down in vim

these are just thoughts, there are probably better options, but i can't thnk of any atm.

Also, how about

  • C-9 and C-0 or C-{ and C-} - just matching pairs
  • C-. and C-,, where dot in vim refers to the last command OR C-; and C-, which go to the next/previoius search result for f

dylan-chong avatar Jun 07 '18 21:06 dylan-chong

Another possibility is C-r (reverse history search) C-s (forward history search) as used in shells like Bash.

wincent avatar Jan 03 '19 14:01 wincent

+1 for this feature

nirajgup avatar Apr 02 '19 20:04 nirajgup

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:

  • https://github.com/wincent/command-t/issues/393

[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

wincent avatar Aug 26 '22 21:08 wincent