• Login
Community
  • Login

Syntax highlighting of unsaved files?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
syntax highlightsyntaxunsaved
9 Posts 4 Posters 995 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    William NoThanks
    last edited by Apr 22, 2020, 10:21 PM

    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”?

    A 1 Reply Last reply Apr 22, 2020, 10:22 PM Reply Quote 1
    • A
      Alan Kilborn @William NoThanks
      last edited by Apr 22, 2020, 10:22 PM

      @William-NoThanks

      Yup, just make your choice from the Language menu.

      W 1 Reply Last reply Apr 22, 2020, 10:24 PM Reply Quote 3
      • W
        William NoThanks @Alan Kilborn
        last edited by Apr 22, 2020, 10:24 PM

        @Alan-Kilborn Wow too easy. I couldn’t find that answer Googling for some reason.

        1 Reply Last reply Reply Quote 2
        • A
          andrecool-68
          last edited by Apr 23, 2020, 5:07 AM

          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.

          Imgur

          A 1 Reply Last reply Apr 23, 2020, 12:12 PM Reply Quote 0
          • A
            Alan Kilborn @andrecool-68
            last edited by Apr 23, 2020, 12:12 PM

            @andrecool-68

            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.

            1 Reply Last reply Reply Quote 0
            • A
              andrecool-68
              last edited by andrecool-68 Apr 23, 2020, 12:58 PM Apr 23, 2020, 12:56 PM

              @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))

              A 1 Reply Last reply Apr 23, 2020, 1:42 PM Reply Quote 0
              • A
                andrecool-68
                last edited by Apr 23, 2020, 1:07 PM

                @Alan-Kilborn I myself made an additional context menu for changing the syntax of the document.

                Imgur

                1 Reply Last reply Reply Quote 1
                • A
                  Alan Kilborn @andrecool-68
                  last edited by Apr 23, 2020, 1:42 PM

                  @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.

                  1 Reply Last reply Reply Quote 1
                  • E
                    Ekopalypse
                    last edited by Ekopalypse Apr 23, 2020, 9:15 PM Apr 23, 2020, 9:15 PM

                    @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 . :-)

                    1 Reply Last reply Reply Quote 2
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors