Sublime Forum

Can a plugin add a UI button to the tab bar?

#1

Is it possible for a ST plugin to add an icon/button to the UI (e.g. at the end of the tab bar) to perform custom action (e.g. hide/show menubar or sidebar)?

0 Likes

#2

Sublime Text doesn’t have a tab bar. New top-level main menu items can be added by Main.sublime-menu files.

0 Likes

#3

What would one call the tab ‘area’ then? Or more to the point, is there any part of the UI where one can add a custom button/shortcut, besides the system menu?

0 Likes

#4

FWIW, you might find it unnecessary to edit the UI after you work with ST for a while. You quickly find that the Command Pallete (CMD/CTRL + SHIFT + P) becomes the one-stop shop for everything. The fuzzy search feature makes it a breeze to find what you are looking for quickly, without lifting your fingers from the keyboard.

I almost never use the main menu systems or the mouse anymore, so GUI controls become a little redundant.

You can add items to the Command Pallete via a .sublime-commands file, where you can pass in the commands and arguments

Command Palette | Sublime Text Community Documentation

I’ve authored a number of ST plugins for myself. I always preface the caption with the same starting text, so that they aggregate together in the Command Pallete, eg:

GB-clean-HTML.sublime-commands

1 Like

#5

Yeah I’ve used ST for a while now and also rarely ever require the mouse/menus to do anything.

That being said,n I’m trying to use it on a tablet, and want to accommodate for circumstances where a separate keyboard is not readily available.

0 Likes