3 ms·
The main pain point of Sublime has always been it's extensibility, or lack thereof. The program is very rigid, and the plugins can't do much. Mainly when creat
by the_onion_hater 4y ago
The main pain point of Sublime has always been it's extensibility, or lack thereof. The program is very rigid, and the plugins can't do much.
Mainly when creating user interfaces, you can't have buttons (for example a "run" button), the only official UI components are the command palette where you search commands, and a "panel", which is basically a single separate text view.
Plugins such as the terminal plugin [1] uses this panel to show an interactive terminal, but anything you do, such as call another plugin, or simply search text, will remove your panel and replace it with another.
The only ways to create real UIs are with very ingenious workarounds, notable mentions being:
- The color picker plugin [2], which literally bundles a small native executable for each platform it runs, containing a color wheel, which the plugin will call, the user will select a color, and the program will close, returning the color code in its exit code, which the plugin is listening to.
- The debugger plugin [3] which has the most complex workaround I have seen using sublime's html capabilities. It uses the panel to show html elements, buttons with images, texts, lists, tabs, everything thorough this workaround. But again, try to search text and you loose it.
That's mainly where VSCode "won", although I still daily drive Sublime when I am not on a "full blown IDE".
[1]: https://github.com/randy3k/Terminus https://github.com/randy3k/Terminus
[2]: https://github.com/weslly/ColorPicker https://github.com/weslly/ColorPicker
[3]: https://github.com/daveleroy/sublime_debugger https://github.com/daveleroy/sublime_debugger
- maegul 4y agoSo I think the ColorHelper plug-in[1] is a better example of the modern gui hack in sublime. Basically goes all in on the HTML engine (for popup windows) that ships with sublime. I haven’t used it myself (HTML), but as far as I understand, buttons can effectively have callback functionality through “links” to commands. Or something like that. Which doesn’t seem too bad to be honest. The author of that plug-in has also written a markdown to HTML extension for the purposes of making it easier to use the HTML engine, and is what is used by the LSP ecosystem for popup windows. But yea, honestly it’s a little strange to me that they don’t ship a basic GUI api that’s moderately flexible for things like buttons text and windows but uses their own GUI engine. [1] https://packagecontrol.io/packages/ColorHelper https://packagecontrol.io/packages/ColorHelper