Inline language switching


What I’ve always wanted for working with modern projects is language syntax aware editing assistance that could keep up with the local language in use.

Currently languages are global to the file but I often work with files that have other things embedded inside them inline ex. would be embedded hand rolled SQL.

And while I’m wishing away here… For things like SQL it would be nice if I could set the SQL assistance to automatically all cap reserved words for me so I can be lazy and leave the caps lock key alone. :smile:

I type in “select name from table where id in [‘12345678’,‘123’]” and it automatically puts this into the file “SELECT name FROM table WHERE id IN [‘12345678’,‘123’]”


I agree with you completely, and I have been asking for this since 2007 or so. (also: regex is a language that deserves its own parser, color highlighting, etc.) Not holding my breath for this to happen anytime soon.


Or something like having CoffeeScrip (or JavaScript) inside a HAML template and having those sections use the CoffeeScript (or JavaScript) grammars instead of HAML


It seems like this is at least close to possible, since fenced code block in a Markdown file are highlighted as the correct language. That was one of the early features I discovered in Atom that got me really excited.

I wonder if the problem here isn’t more that most of the syntax themes are still just imports from Textmate, rather than being written for Atom.