Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ not syntax highlighting my files

Until a week ago I was happily coding html.erb files in Notepad++ with syntax highlighting. Then my hard drive crashed.

I reinstalled Notepad++ on my new system but when I open my html.erbs, only a few of them are highlighting properly.

I think the problem might be that most of these files are being considered 'normal text files', where the few that are working are considered 'html files'. I tried 'save as' html file of the same name, but it isn't working. How can I get my syntax highlighting back? This is seriously slowing me down.

like image 769
sscirrus Avatar asked Aug 05 '10 19:08

sscirrus


People also ask

How do I enable syntax highlighting in Notepad++?

Open Notepad++ once again, go back to the language menu, and at the bottom between "Define your language" and "User-Defined" you should find "choicescript". Select it and and your code should automatically be highlighted.

How do I highlight notes in notepad?

If you prefer to use the keyboard, hold the Shift key and use the arrow keys to select text in any direction. Hold Ctrl and Shift while pressing the left or right arrow key to select one word at a time instead of a space at a time. To select the entire document, press Ctrl-A.

How do you highlight all words in notepad?

Notepad also comes with additional ways to select all text. Right-click or press-and-hold anywhere to open a contextual menu. Then, click or tap on Select All. Alternatively, you can also access the Edit menu from the top-left corner, and then click or tap on Select All.


2 Answers

You could try going to Language > H > Html and that should highlight stuff.

like image 141
Ashley Grenon Avatar answered Sep 28 '22 05:09

Ashley Grenon


Just in case, if anyone meets my situation: I had activated Enable global foreground color in panel Settings -> Style configurator..., deactivating it reactivated syntax highlighting.

like image 40
Emmanuel Avatar answered Sep 28 '22 04:09

Emmanuel