I know I'm not the first to need this. I am working on an in house created codebase and I would like to apply highlighting to it within Eclipse. In Notepad++ I can set language for the file I'm looking at. Is there any way to do this for Eclipse?
The code I'm working on would use the same syntax styling as C++.
As Andrew Eisenberg said, go to Window --> Preferences --> General --> Editors --> File Associations and ensure your choices for editor for each file type are correct according to your desires.
However, for Eclipse CDT most of your file types are set in Preferences --> C/C++ --> File Types instead.
Also, like he said, you can use the right-click menu to choose your own editor, including an external system editor, such as Sublime Text 3, Atom, Visual Studio Code, Notepad++, etc.
Right click on the file --> Open With --> Other... --> choose an "Internal editor" or "External program" to your liking, optionally checking the box at the bottom to make this the default choice next time.
Your best bet is to go to Preferences -> General -> Editors -> File associations. Add the file extension of the thing you are trying to open and add the C++ editor as the associated default editor.
If there is no file extension, then things are a little harder. Instead of double-clicking to open the file, right-click -> Open with... -> other -> C++ editor. This will remember your choice for that file only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With