How to set the programming language for syntax highlighting etc in Adobe Brackets editor?

13,937

Currently, you cannot switch the language for untitled files. Once a file exists on disk, you can use the dropdown in the status bar to change the language (or just rename the file to a different extension, of course).

Sadly, the only reason it's disabled for untitled files is that the JS code hinting engine (which is quite complex) has bugs when it encounters untitled files. So really, only the JS language option in the dropdown needs to be disabled... but to avoid confusion, the entire switcher is disabled instead.

If you want to see that fixed, please upvote the feature request in the Brackets backlog.

Share:
13,937
hippietrail
Author by

hippietrail

I'm a self taught hobby programmer with diverse and often changing interests. I learned BASIC on several microcomputers of the '80s and '90s then Z80 machine code on the Sinclair ZX Spectrum without an assembler then C and 68000 assembly on the Commodore Amiga then C++. Once Doom and Linux appeared I moved to the PC and started with scripting languages. I've moved from Perl to NodeJS, skipping Python and Ruby. I always find edge cases few other people hit in almost any project I get into. I worked as a professional C programmer from the mid nineties until the IT crash on Amiga and then PC. I'm very happy to be coding just for myself again.

Updated on July 01, 2022

Comments

  • hippietrail
    hippietrail almost 2 years

    I was looking for a code editor that uses a browser rendering engine for its GUI so I can work on code that handles various foreign languages in their native scripts.

    I'm trying out Adobe Brackets but when I create a new file I can't find a way to set the programming language to get the syntax highlighting.

    This happens for instance when I go to File / New then paste in code from somewhere like JSFiddle.

    If I right-click on the name of the file in the left column there is a rename menu item, but it doesn't react so I can't add a .js extension for my JavaScript file.

    There is an item in the status bar at the bottom right between the INS/OVR toggle and the lint indicator, but for a new unsaved file with no extension it is greyed out and cannot be changed.

    There is a doc page titled Language Support but it seems to only cover deeper technical aspects, such as the editor's programming API.

    How can I set the programming language? Is this editor just immature or is there a feature I can't find?