Sublime Forum

A selector for the status-bar alike the encoding-selector

#1

Hi,

i’d like to learn if smth. like the build-in encoding-selector can be done within a plugin. Use case is : when working with Coffeescript, i’d like to be able to quickly switch back and forth between CS 1.xx to the current version. When i do CS/JS for a Node or Browser-Environment i’d use the current CS-compiler, but e.g. when working against Nashorn, CS-1 would be perfect.
Maybe i add another tmLanguage and LinterSetup and register file-endings for .coffee(current) and cs1(older 1.xx) ?
Has this been done or can it be done easier ?

thx and greets, Andreas

0 Likes

#2

ST doesn’t provide an API to create clickable status bar objects per plugin, which would be able to open a menu or run any command, but you could write a plugin with a TextCommand object which sets a syntax file and modifies settings, which then could be called via command pallet or key binding.

0 Likes