Sublime Forum

Why Sublime Text is configured in so brutally hardcore way?

#1

Sublime Text uses JSON configuration files almost for everything.
While it is not bad, it is not good at all!
Let me show you a few examples:

  1. I wished to set the default ANSI encoding to CP1251 (Cyrillic).
    To do it in other editors (e.g. jEdit, Notepad++, AkelPad), I just open the configuration dialog - and select the desired encoding.
    To do it in Sublime Text, I have to edit “Preferences.sublime-settings” manually without knowing of what exactly to modify.
    OK, there is an option “fallback_encoding”. But what are the possible values of it? I still have no idea what values are acceptable if I want to set some other encoding. Where can I find this information?

  2. I wished to change the background color of the selected text.
    To do it in other editors (e.g. jEdit, Notepad++, AkelPad), I just open the color configuration dialog - and pick a color I want.
    To do it in Sublime Text, I have to pass all the circles of hell…
    In short, I had to figure out the conception of sublime-package. E.g. the default color theme is a file “Monokai.sublime-color-scheme” inside “Packages/Color Scheme - Default.sublime-package” that is a zip-archive in fact. Then I had to modify this sublime-color-scheme file manually (as a text file) to get the colors I wanted, while the colors were defined in an anusual way (HSL format) inside of that file…
    Guys, do I really need to know all of this to simply change a color???

  3. I wished to customize Sublime Text’s project file.
    OK, the Sublime Text’s project file is a very handy feature that is almost unique.
    But when I click “Edit Project” I see an almost empty file without any clue of what can be added there.
    The page http://www.sublimetext.com/docs/3/projects.html is pretty useful - but hey, it is so unbelievably hardcore to type all of this manually…
    For example, I needed several unsuccessful attempts until I understood that multiple file extension patterns must be specified as a list of separate strings e.g. “file_exclude_patterns”: ["*.map", “*.obj”, “*.pdb”]
    Why the project file does not initially contain some commented out example lines similarly to as the “Preferences.sublime-settings” does?

These are just a few examples, and all of them make me wonder:
Why there is no UI to configure these things?
Why there is no (context-sensitive) offline help available as a part of Sublime Text?

0 Likes

#2

I leave the precise answer to your questions to somebody else, possibly ST’s authors. I don’t know the real answer.

But, if I may, i’d like to speak my point of view about this.
As you say at the beginning of your post, writing jsons is not that bad. And you’re right when you say that it requires too much work just to change a single option.
But in the long run, if you plan to use ST as your editor of choice and you want to tailor it to your personal specific needs, you wind up changing a ton of options.
In my personal case, I tweaked ST a lot to adapt it to myself, and it is still an ongoing process: I wrote my plugins, my snippets, my own color theme, my own build systems; and I’m still doing small modifications every other day. Obviously I had to study and learn what ST requires me to do to have all of this. But I think that editing files, including json configuration files, after hundreds of small corrections saved me time compared to doing the same thing using a GUI option panel.

1 Like

#3

In regard to item 2, it sounds like you went about color scheme customization the hardest way possible. You generally never need to open a zip file in Sublime Text. If you want to see the contents of a file in a package, use the command “View Package File” from the command palette. To modify a file, you can read the section " Overriding Files From a Zipped Package" at https://www.sublimetext.com/docs/3/packages.html. This ensures that if the package changes, your customization are not lost.

That said, color schemes offer a simpler way to customize. You don’t need to wholesale “override” the file. You can instead add rules. Here are the docs for customizing a color scheme: https://www.sublimetext.com/docs/3/color_schemes.html#customization. And the settings for selection: https://www.sublimetext.com/docs/3/color_schemes.html#global_settings-selection.

In terms of HSL, that is the author’s choice. I personally find HSL easier to reason about when creating a color scheme since I can pick a handful of hues and then create light and dark versions for the various situations needed. However, you can use pretty much any format you want: https://www.sublimetext.com/docs/3/color_schemes.html#colors.

I understand the text file preferences versus a GUI is somewhat of a personal preference, and using text is more “advanced”, however the benefits of being able to use the editor to search and modify is something I’ve always enjoyed as a user. Plus backing up the configuration and searching through it is very simple. That said, I’m sure we could improve things in terms of autocompletions for valid options in some situations. I’ve definitely tried other editors with GUI-based settings, and did not enjoy the experience.

4 Likes

#4

PackageDev provides completions and help tooltips for setting options and also offers a quick edit button on the default settings that allows you to quickly adjust a certain key-value pair (screenshots). Completions about encodings are not specifically provided currently, because we parse the completions from the setting value’s type and the comment preceding it, but I will add special cases for encoding-related settings, because these are indeed not exactly discoverable. (Edit: done. Included in the next release.)

(PackageDev also provides a command to create a color scheme adjustment file in your User folder and opens it next to the original.)

4 Likes

#5

Thank you very much!
I really appreciate your support!
Yes, the PackageDev looks like something I expected to see embedded in Sublime Text (additionally I was looking for packages containing “Config” and “UI” in their name).
I’ll also experiment with config overriding using the “User” folder, thanks for the hint!

1 Like