7

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.

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 '13 at 20:28
8

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 '17 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 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 '13 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 '13 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 '13 at 5:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.