8

Using Sublime Text 3, is there a way to shorten the list of syntax options that are presented when changing the syntax? There are about 50 language options, and I only use about 5, so I'd like to only see those 5 to quickly select, .e.g., css, js, html, php, or sql.

I imagine there's a way to do this without deleting the syntax files, rather some kind of user settings override.

3 Answers 3

9

You can disable a lot of syntaxes by disabling it's package with Package Control.

  • Ctrl + shift + P
  • type disable, and select "Package Control: Disable Package"
  • Find syntax's package and select it.
1
  • Perfect. I was also able to re-enable using the same steps above with enable. Dec 6, 2013 at 20:28
9

Using @d_rail's advice, I disabled the packages. That resulted in the following settings in my User preferences file:

{
    "ignored_packages":
    [
        "ActionScript",
        "C++",
        "Haskell",
        "TCL",
        "Go",
        "Lisp",
        "Graphviz",
        "Scala",
        "Pascal",
        "Clojure",
        "ASP",
        "Vintage",
        "Objective-C",
        "R",
        "RestructuredText",
        "Erlang",
        "Groovy",
        "Lua",
        "OCaml",
        "C#",
        "Matlab",
        "Textile",
        "D",
        "Batch File",
        "AppleScript",
        "Makefile",
        "LaTeX",
        "Java"
    ]
}
2
  • 1
    IMO much more convenient option than @d_rail's one Apr 4, 2017 at 8:54
  • How can we disable a sub-package? For example... I want to keep C# but remove "NAnt Build File" which lives under the C# entry in the UI syntax list? I have tried "C#\\NAnt Build File" and variations on that... with no luck. Mar 10, 2021 at 17:54
0

Remove the unwanted syntax files from the Sublime packages directory.

3
  • I tried removing the syntax files, but that didn't work for me. Maybe I'm doing something wrong. Know of a way to do this via User settings? Dec 4, 2013 at 20:49
  • Just asking... are you sure you removed them from the correct folder? I don't know your platform, but removing the syntax files really should be all that is needed. If it is Windows, it will be under AppData. Dec 5, 2013 at 1:54
  • Nope, I am not sure. But I removed all instances of the "Haskell" syntax file I could find on my system. Using OSX and Sublime Text 3. Dec 5, 2013 at 5:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .