Syntax highlighting of unsaved files?
-
I often use Npp as a scratchpad to copy/paste SQL or XML code to review.
If I save the file with *.xml or *.sql, the syntax highlight works. Is there a way to trigger syntax highlighting somehow?
I.e. if I copy/paste a bunch of SQL text into a blank, unsaved sheet, can I just tell Npp “this is SQL”?
-
Yup, just make your choice from the Language menu.
-
@Alan-Kilborn Wow too easy. I couldn’t find that answer Googling for some reason.
-
The language of the new open file is set in the settings set the language syntax for the new file manually. The program cannot find out what language you want to write the tomorrow file in the morning.
-
I would have pointed out the Default Language setting in my answer, except the OP mentioned he uses TWO languages in “new” files. Since there is only ONE available as the default (obviously), it may be best to leave that setting as Normal Text.
-
@Alan-Kilborn
I did not say to go into Settings and periodically change the settings for opening a New document.
Need to stop by Menu >> Language
These are all the difficulties of translating into English)) -
@Alan-Kilborn I myself made an additional context menu for changing the syntax of the document.
-
@andrecool-68 said in Syntax highlighting of unsaved files?:
Need to stop by Menu >> Language
If by that you were trying to repeat me when I said “just make your choice from the Language menu”, then I’m not sure why you did that because I had covered it ~7 hours earlier.
I did not say to go into Settings and periodically change the settings for opening a New document.
That’s strange, because you pointed the OP to that section of the Preferences.
These are all the difficulties of translating into English
From my understanding, @Ekopalypse is not an English speaker, yet his posts make perfect sense. I understand he uses
deepl.com
for translating from his language to English before posting.I myself made an additional context menu for changing the syntax of the document.
Ah, well that’s a valuable contribution to this thread that could perhaps help the OP. Nice one.
-
@Alan-Kilborn said in Syntax highlighting of unsaved files?:
From my understanding, @Ekopalypse is not an English speaker,
Yes, correct.
yet his posts make perfect sense.
I’m not sure about that. :-)
I understand he uses deepl.com for translating from his language to > English before posting.
Most of the time I do.
If I can give short answers, I sometimes try to do it without a translator.
And I think it is easy to find out which posts are written with and without deepl.com. :-)