How to set a programming language for syntax highlighting, etc. In the Adobe Brackets Editor?

I was looking for a code editor that uses a browser rendering engine for its GUI, so I can work with code that processes various foreign languages ​​in its own scripts.

I try to use Adobe Brackets, but when I create a new file, I can’t find a way to set the programming language to get syntax highlighting.

This happens, for example, when I go to File / New and then paste the code from somewhere like JSFiddle.

If I right-click on the file name in the left column, there is a rename menu item, but it does not respond, so I can not add the .js extension for my JavaScript file.

In the status bar in the lower right corner is the INS / OVR status switch and the lint indicator, but for a new unsaved file without an extension, it is inactive and cannot be changed.

There is a Language Support document page, but it seems to cover only deeper technical aspects, such as the editor API.

How to install a programming language? Is this editor just immature or is there a function that I cannot find?

+5
source share
2 answers

Currently, you cannot switch the language for untitled files. Once the file exists on disk, you can use the drop-down list in the status bar to change the language (or just rename the file to another extension, of course).

Unfortunately, the only reason it was disabled for untitled files is because the JT code mechanism (rather complex) has errors when detecting untitled files. So really, only the JS language option in the drop-down list should be disabled ... but to avoid confusion, the entire switch is disabled.

If you want to see what is fixed, please refrain from calling the function in parentheses .

+8
source

Try manually entering the file type when saving, for example: index.html (including the extension), not just the index

It worked for me!

0
source

Source: https://habr.com/ru/post/1201535/


All Articles