Sublime Forum

Support request: enable line numbering for all files except plain text

#1

I’m having terrible trouble getting Sublime to omit numbers for, only, plain text files.

I expected this to be easy, especially on Windows, since Windows uses file extensions - and I use Sublime on Windows and on Linux. On Linux, it should not be that hard either, since Sublime recognises different file types (in order to do syntax highlighting).

Yet, it isn’t easy. I can’t find out how to do it. I’ve come across mention - on a Sublime webpage that is out of date - of per-file-type-settings, but I can’t find a decent explanation of them and I’m not going to create a preference file for every non-plain-text file that I use.

Please help.

PS: The official Sublime Text documentation pretty much confesses itself scanty, and points one to unofficial documentation that hasn’t been updated since 2014? What?

0 Likes

#2

The out of date documentation you’re referencing is for Sublime Text 2; the official documentation for the current version is available at the support link at the top of the page. Note also that the unofficial documentation hasn’t been left untouched since 2014; pretty sure the mention to 2014 you see on the front page is in reference to people who pledged their financial support to the unofficial documentation authors in that year.

In any case, it is indeed possible to set settings per file type, but I think you’re going about it from the wrong angle. Your question sounds like you think you need to go into the settings for every possible file type other than the plain text ones to turn on line numbers, but that’s not the case.

The Preferences.sublime-settings file sets the global default settings for everything and the syntax specific settings change the settings for that particular syntax. As such if you want line numbers everywhere but plain text, then you would turn line numbering on in your preferences and off in the plain text settings instead.

2 Likes

#3

That is all very helpful. Thank you. However, I do not know how to ‘turn line numbering [. .] off in the plain text settings’ (though I find that, on my Linux rather than Windows computer, line numbering for - only - plain text is off already).

0 Likes