Sublime Forum

Quick panels and completion popups

#1

I have a couple of questions on quick panels and the completion popup. The basic point is that it would be nice if one could have more control on what is displayed and what happens when the user selects an entry.

Case in point. I am writing a LaTeX package, and one feature I have added is the automatic insertion of references. When the user hits ctrl+alt+r, the completion popup is shown, listing the relevant labels. The user then selects one and continues working. There are two problems with this. First, it would be nice (if not essential) if the command could also insert the \ref{} command automatically; the only way to do this, however, is to populate the completion popup with \ref{label1}, \ref{label2}…, which is unsightly :frowning: . Second, the labels shown may not mean much—it would be nice to be able to show some surrounding text, like RefTeX does for Emacs.

The only current solution would be to use a QuickPanel, but this is distracting—I do like the idea of a completion popup that is unobtrusive and does not cover the text one is working on. A better solution might be a cross of the completion popup and the quick panel—somethign that allows you to display arbitrary text, but then returns control to the caller or invokes a call-back with an index to the selected item, for further processing.

Perhaps a future version of Sublime Text might provide this… an alternative would be to use CocoaDialog, which has a wx-based Windows port. Any commetns?

0 Likes

#2

I like the ideas… the autocomplete popup is pretty bare-bones atm, it’s on the todo list to make it better.

0 Likes