Add ability to select language using Command Palette


#1

Sublime Text allows users to select or switch the document’s language using the Command Palette. Atom should have that ability too, so I don’t have to use my mouse.


Set syntax mode from Command Palette
How to change/Assign syntax to buffer?
#2

Shift-Ctrl-L. You’re welcome.


#3

Or Grammar Selector: Show on command pallet if you don’t want to remember a second key binding :wink:

BTW, this is the https://github.com/atom/grammar-selector package.


#4

Thanks - I was (obviously) looking for “language” instead of “grammar”!

However, with Sublime Text, I can open the Command Palette & type the NAME of the grammar I want to switch too. I don’t have to first type “grammar” & THEN start typing the name of the grammar. Granted, the key command gets there right away, but I use the Command Palette so I don’t have to remember key commands. :smile:


#5

As far as I understand how things currently work in Atom, the command palette simply displays a list of all triggerable events known to the editor (in humanized form). It should be relatively straight-forward to build a plugin that creates a new activation event per available grammar.


#6

i was looking ‘set syntax’ like in sublime, also tried ‘language’, never thought of grammer, can we set alias ‘set syntax’ just point to grammer command ?


#7

i also expected the keywords language or syntax highlighting but never grammar.


#8

I created a package a while back, set-syntax, that offers this functionality.