Sublime Forum

Interface Suggestions


This is not a suggestion by itself but a reply to many posts as I read through them.

You should be able to do this curretnly by creating an output panel and not showing it. Output panels behave just like normal views, except that they have a few settings overrides such as a disabled buffer.

Edit Preferences has a feature that lists all plugin-defined command names in a quick panel.

You can sort of do that already by tracking whether your quick panel is active and defining a key binding with a context that only triggers when this is the case. We do this for FileHistory to emulate Goto Anything’s right arrow key feature and allow deletion of entries with the delete key (only if the caret is at the end of input).

What you should do instead is:

  1. Use on_modified_async. If you intend to not do an action immediately on a modification that absolutely has to occur before the next one is encountered (imagine setting the view to read_only if a certain thing happened), you should always be using async events.
  2. Use an integer counter that you increase for each invocation of the command and register a timeout call via sublime.set_timeout_async where you decrease it. When it reaches 0, you do whatever you want to do.

Although this is a rather common use case of modfication events, I currently don’t see a nice API that’s not too specific for this use case and would seem like an arbitrary specification of something that would be 20 LoC. Maybe setting the timeout in a class variable could work though.

Yes, please! I work with InactivePanes, which absolutely has to modify the color scheme since it changes the colors of all scope selectors. But all the other plugins like SublimeLinter or ColorHighlighter (or GitGutter even, which needs it for the gutter icons) really only want to add specific RGB colors so that they can use them in add_regions and the conflicts are amazingly annoying.

There is a special <character> key binding that will trigger for any character to be inserted in the view. The command’s run method is called with a “character” parameter containing the character to be inserted. With sufficient context specifiers, you should be able to do almost anything.

That wouldn’t be an API though.

Some plugins only rarely have to show something in the gutter (SublimeLinter) and would rather have ST handle gutter conflicts by itself (maybe by automatically widening the gutter if the line is scrolled into view), while GitGutter would probably like to have its own dedicated column.

You do this by changing a the “folders” item in the window’s project data and setting it with window.set_project_data(), as you show in the sample code. The decision to use relative paths should be the plugin’s, as well as the follow_symlinks value.

Your main goal is to completely define a command’s key mapping from within a plugin, correct?
I would rather have the context queries exposed (as suggested by @kingkeith here) and then a single addition of is_context or is_active which replaces the behavior of a context object in a keymap. Keys should imo still be defined from keymaps since that makes them easier to override and is more consistent.



Now, onto some additions to other suggestions:

I would like to add to this the ability to add panels to views (not just the window with output panels). These panels should move and appear/disappear with the rest of the view and be stickable to any side. Ideally you could show multiple panels on each side or allow the user to rearrange them however they like (comparable to many other applications that have panels like Photoshop or Gimp), but that’s a UI not an API thing.

And, while we’re at it, there could also be window-specific panels (like that HTML view), except that they are always visible (unless closed) and not part of the view layout. That’s not a high priority though since you can emulate this with HTML views.

Not so much a fan of this. What we really need is a:

See also the main thread.

Personal priority: major

Specifically, I’d like to have the following features in a notification system:

  1. Informal notifications about something that happened, such as PC not finding any updates or a build/other action being successful. Plain text or HTML.
  2. Notifications allowing user input, i.e. with buttons (think of a subtle OK-Cancel dialog). See also the main thread for a mashup of this.
  3. Notifications that must be close by the user and do not close automatically after a timeout. Conversely, it should be possible to provide a timeout for a notification (and there should be a default timeout set by ST).
  4. Showing progress with a progress bar and some optional text that can be updated. Also a state where “generic” progress is shown without a value (Windows refers to this as “marquee mode”).
  5. All notifcations should be cancellable via API (e.g. if they become irrelevant).

API suggestions as follows (similar to @huot25’s):

handle = window.show_notification(title, html_content="", location=None,
                                  dismiss_timeout=None, on_close=None,
                                  buttons=["Yes", "No"], on_navigate=None)
# Needs to be window-specifc to show the popup on the minitor the window is on.
# - title is the notification title
# - html_content is optional and would be html as it is for popups
# - location
# - both location and timeout defaults would be configurable in ST's preferences
#   and used if `None`. A timeout of 0 means it persists.
# - on_close is a callback that would be called with the button text of the 
#   clicked button or `None` if user dismissed
# - on_navigate is the same as for popups

handle.update(html_content=None, dismiss_timeout=None, buttons=None)
# same as above, pretty much. Only updates values specified

# Add, change or remove a progress bar from the notification.
# dismiss_timeout from the creation would apply once the progress is finished
# or removed.
# - value is either
#   * a number in the range [0, 1]
#   * a special value for marquee mode (`sublime.MARQUEE` or `-1`)
#   * `None` to disable

# dismisses the notification

# Attempts to bring attention to the notification by flashing it.
# Could also cause the notification to be displayed as the "newest".

Changing the icon this way would also be nice, I guess.
I’m not so sure how I feel about


Package Control Focus Stealing
split this topic #14

A post was merged into an existing topic: API Suggestions



Some editors (eg Notepad++) have a configurable function list panel which my colleagues love, but I can’t match in ST: It gives an immediate clickable overview of all the lines in a file matching a regexp - e.g.
Match: ^\s(*FUNCTION|PROCEDURE) \s+[A-Z0-9_]+
Show: \2
This only shows functions in the current file. Maybe a multifile-tree-based varient based on sublime’s index files would be even better,



Support multiple icons per line in the gutter.


Gitgutter, linter, bookmarks, bracket matcher, etc. all fight for a place in the gutter and there can be only one. There is no solid logic for which one to show, so Sublime should support having multiple icons. Perhaps through multiple gutters, but that’s not very elegant (this is Atom’s solution and it’s an annoyance as far as the GUI goes). Instead, the gutter could simply grow to accommodate icons as required.



Indicate active editor pane when multiple are open.


Currently, there is no hook for themes to indicate which editor is active / has focus. Visually they are identical.


Boxy – It Was the Most Hackable Theme for Sublime Text 3

I guess I envisioned this working independent of the pop_up API altogether. What happens when you are using a plugin that uses pop up’s and this notification is trying to display. Since you can only have one pop_up per view they would be battling to display. I guess I feel like these really serve two purposes. One is for contextual information related to what is in the view and the other is strictly for informational purposes related to an even or action that occurred.

I do like your innovation and thinking outside of the box. It is a really interested approach that you have come up with based on what we have available!

With my limited testing on_query_completions was not invokable directly. It could only be called when you pressed ctrl+space. Although, now that I think about it you could just invoke the command via run_command which might be something to look at.


split this topic #19

2 posts were split to a new topic: Interface Suggestion Discussion: Indicate active editor pane when multiple are open


split this topic #21

2 posts were split to a new topic: Interface Suggestion Discussion: Add possibility to create new Gutter



Here are two I would absolutely love .

Importance : Major

Description :

  1. Icons in the tab bar.
  2. A stylish autocomplete (changes might need to be done in the api as well ) . Much like the one that Atom has.


  1. I would like to have these features because more often than not, I am working with sidebar closed and with multiple technologies - for example LUA embedded in a C++ Container which also contains HTML/CSS and JS. Having icons at the top bar will easily help me to identity which type of files are open very quickly instead of gauging it from the syntax .

  2. Having an advanced (yet stylish) autocomplete dropdown would help me to easily identify the type of the item in the dropdown (if its a method, a variable , etc) . Another example of the advanced Autocomplete would be the parameters that a function that i chose in the autocomplete is expecting.



split this topic #24

A post was split to a new topic: Question about Interface Suggestions



Scroll Bar Colors are too Dark to see

Please change the color of the scroll bars. They are extremely hard to see. Dark color on top of a dark color is pretty useless. I recommend you use the same colors that the underlining systems use. I am on a MAC and in Safari they are GREY over WHITE. I think that is the same on Windows.

Or at least has an option to indicate you want to use the systems color.


1 Like


Still hoping for font ligatures, although “it won’t be soon”.



Possibility to open / search in inside editor ( like in Atom )

1 Like


Block Cursor Foreground Colour

Importance: Major

Motivation: I want to easily read the text that dsiplays in front of the block cursor

Description of the problem:

Currently we can get a block cursor by setting inverse_caret_state to true.

I can style the cursor in tmTheme files with the selection and caret keys.

The problem is that even though the cursor uses selection to set the background colour, it completely ignores selectionForeground unless you actually click and drag over some text.

Here is a gif of the problem: (selectionForeground is set to #000000)

I would like selectionForeground to be toggled on the current character that is in front of the block cursor when it blinks on and off rather than using the syntax colour.

In the gif you can see that when the block cursor is resting on a character and blinking the character foreground colour stays the same.

I want the colour to change to black (in this example) when the cursor blinks on, and revert back to normal when it blinks off.

The normal selection styles are fine.

If this could be added Sublime would finally have a decent block cursor in my opinion.

My thread describing the full problem can be found here: inverse_caret_state foreground colour



I use Zeal and the Zeal package for this, which works perfectly fine. I do not think that we need an inline HTML panel for everything, especially if it already exists in external applications (compare “live HTML preview” packages that use chrome). Also, this needs to be done as a plugin anyway, which is why your suggestion is extremely unspecific and in fact the same as Interface Suggestions.



Unfortunatelly, zeal doesn’t work on Mac? :frowning:



This is true, and will continue to be the case:

You’d have to use Dash on OSX.



Peek Definition (like in VS Code)



It’s weird that no one bring the toolbar problem in discussion.

Importance: Biased


For some, it will be nice to have a quick access to various functionality, like save, text transforms and so on. For me, this is quite useless in most cases, but it would be useful in cases where you’ll use mouse a bit more, like doing debugging (i.e. set a breakpoint, evaluate variables and so on).