Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Syntax highlighting of unsaved files?

    Help wanted · · · – – – · · ·
    syntax highligh syntax unsaved
    4
    9
    220
    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 NoThanks
      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 Kilborn 1 Reply Last reply Reply Quote 1
      • Alan Kilborn
        Alan Kilborn @William NoThanks last edited by

        @William-NoThanks

        Yup, just make your choice from the Language menu.

        William NoThanks 1 Reply Last reply Reply Quote 3
        • William NoThanks
          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-68
            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 Kilborn 1 Reply Last reply Reply Quote 0
            • Alan Kilborn
              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-68
                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 Kilborn 1 Reply Last reply Reply Quote 0
                • andrecool-68
                  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 Kilborn
                    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
                    • Ekopalypse
                      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
                      Copyright © 2014 NodeBB Forums | Contributors