Community
    • Login

    Syntax highlighting of unsaved files?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    syntax highlightsyntaxunsaved
    9 Posts 4 Posters 966 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.
    • William NoThanksW
      William NoThanks
      last edited by

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

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @William NoThanks
        last edited by

        @William-NoThanks

        Yup, just make your choice from the Language menu.

        William NoThanksW 1 Reply Last reply Reply Quote 3
        • William NoThanksW
          William NoThanks @Alan Kilborn
          last edited by

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

          1 Reply Last reply Reply Quote 2
          • andrecool-68A
            andrecool-68
            last edited by

            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

            Alan KilbornA 1 Reply Last reply Reply Quote 0
            • Alan KilbornA
              Alan Kilborn @andrecool-68
              last edited by

              @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
              • andrecool-68A
                andrecool-68
                last edited by andrecool-68

                @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 KilbornA 1 Reply Last reply Reply Quote 0
                • andrecool-68A
                  andrecool-68
                  last edited by

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

                  Imgur

                  1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @andrecool-68
                    last edited by

                    @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
                    • EkopalypseE
                      Ekopalypse
                      last edited by Ekopalypse

                      @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
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors