Sublime Forum

My own functionality resembling Go to Anything

#1

Suppose I have an index of all classes declared in the program. I want to show the user something like the go to anything panel that would display the entire list and preview the corresponding location when a class gets at the top of a filtered list (just like go to anything previews files that end up at the top of the filtered list of files in the project).

Questions:

  1. Is show_quick_panel performant enough to work okishly with huge lists (say, 10k classes)?
  2. Can I intercept keypresses in a widget displayed by show_quick_panel and preview stuff in the background just like go to anything does?
0 Likes

#2

Just to answer my first question, even 100k items is not a problem. The panel gets shown immediately and fuzzy filtering when typing is instantaneous.

0 Likes

#3

Allrigthy sublimetext.com/forum/viewtopic … 60&p=36142 seems to be very relevant for #2. Reading up now.

upd. Apparently it’s totally possible to: a) bind to keypresses on a quick panel, b) acess currently typed text on a quick panel. Yay! github.com/facelessuser/FuzzyFi … ile_nav.py

0 Likes