Community
    • Login

    add comment to text files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    comment txt
    20 Posts 5 Posters 31.7k 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.
    • notepad347N
      notepad347
      last edited by

      it is frustrating it does not exactly work the way I want, but I have now tried UDL and it works fine too. I also put on “operators & delimiters” tab in delimiter 1 style " for open and " for close so strings will be in color. I hope I use the correct tab and input field, because there are so many. But it works, so I guess yes.

      But I notice when i put ># < in open for “comment line style” on “comment & number” tab (there is a space after #), it removes a space when i open notepad++ again.

      Thank you all for help

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • rinku singhR
        rinku singh @notepad347
        last edited by

        @notepad347
        You should create a user defined language who reach # as comment

        1 Reply Last reply Reply Quote 0
        • Meta ChuhM
          Meta Chuh moderator @notepad347
          last edited by

          @notepad347

          I also put on “operators & delimiters” tab in delimiter 1 style " for open and " for close so strings will be in color. I hope I use the correct tab and input field, because there are so many.

          yes, that is the correct location

          But I notice when i put ># < in open for “comment line style” on “comment & number” tab (there is a space after #), it removes a space when i open notepad++ again.

          string delimiters can not contain nor end with spaces, spaces are only used to separate multiple string delimiters.
          eg: you can have multiple comment line syntaxes if you type # // :: in your comment line style > open field.
          this makes it more flexible if you get txt files from people who use other remark marker/delimiter strings

          #this is a remark
          # this too
          // this too
          :: this too

          btw:
          if you want to deploy your udl easily to other machines, just copy the xml file:
          %appdata%\Notepad++\userDefineLang.xml
          into the same location on the other machine.
          (in case deploying to other machines was the reason why you wanted to do it via the default xml files in the first place)

          Scott SumnerS 1 Reply Last reply Reply Quote 3
          • Scott SumnerS
            Scott Sumner @Meta Chuh
            last edited by

            @Meta-Chuh said:

            PeterJones…i admire your sean connery style “never lose your temper”

            Hey, for the record, I don’t lose my temper…even if I get called a “f—king retard”! [In fact I was so “delighted” by that posting of a few days ago (reference not worth looking up) that I screenshotted it and put it in my “Gems” folder.]

            But I do try to keep discussions here “on track” and I am rather “short” with posters that can’t ask a question clearly, or refuse to think things through, or just want to be demanding, or…the list goes on. Free software, free support…show some gratitude and forethought, people! :-)

            But yes, I agree, @PeterJones has a style all his own! +1

            Meta ChuhM 1 Reply Last reply Reply Quote 4
            • Meta ChuhM
              Meta Chuh moderator @Scott Sumner
              last edited by

              @Scott-Sumner

              even if i get called …

              originally i had something about this and more in my post above, but i decided not to post it because it was too long and too much, even for myself.

              one part of it was: noone here minds if you lose your temper from time to time, because you have had to deal with such cases the most of all, and if you do you do it with grace, reason and the regular’s support.

              another part i removed was that i bet we lost a few very good people, like claudia, because they tend to take such encounters and even little things like a missing feedback emotionally with them, to the extent that they start thinking about it days after, even if they are not in front of any computer nor visiting this community … this makes me sad and i urge every visitor to treat everyone around here as they would treat a friend instead of a hotline kind of slave.
              (prerequisite is that they treat friends as normal people do ;-) )

              Scott SumnerS 1 Reply Last reply Reply Quote 3
              • Scott SumnerS
                Scott Sumner @Meta Chuh
                last edited by

                @Meta-Chuh said:

                i bet we lost a few very good people, like claudia, because they tend to take such encounters …

                So we are pretty far OT now…but I don’t want you to have a misperception about Claudia. She was much like Peter is here, very even keel emotionally and eager to keep helping even after being insulted; I observed that many times–not that she got insulted a lot, and certainly never called a “retard”–hehehe, still giggling…

                My understanding is she stopped using Notepad++ because she wanted to use a product that was continually being improved–not that Notepad++ isn’t being improved, but that improvement moves too slowly for some peoples’ taste.

                I tend to agree–my evidence is that I used 6.7.5 for the longest time, and currently my day-to-day use is 7.2.2, and I see no compelling feature additions (what version of Scintilla is Notepad++ using?–REALLY??) or bug fixes to make me move “forward”–in fact, I would move forward but bugs seem to be on the rise, not the opposite. If I had to pick a version post-7.2.2 I don’t know what that would be–certainly not 7.6.* with the PluginAdmin debacle going on… And…we still can’t “find-in-selection” or “replace-in-a-column-block” or…dang, I could go on all day with a list like this…

                But for the moment, I happen to need a text editor, so (again, for the moment ) I’ll hang around. :-)

                Meta ChuhM 1 Reply Last reply Reply Quote 3
                • Meta ChuhM
                  Meta Chuh moderator @Scott Sumner
                  last edited by

                  @Scott-Sumner

                  but I don’t want you to have a misperception about Claudia

                  one more reason why i originally didn’t post it.
                  just an expression how i would feel if i was her (or any other regular)

                  so (again, for the moment ) I’ll hang around. :-)

                  hopefully as long as possible, otherwise i’d have to think about something i could do to lure you back here just for the fun of it ;-)
                  thank god that this is just a far and purely hypothetical future.

                  1 Reply Last reply Reply Quote 1
                  • notepad347N
                    notepad347
                    last edited by notepad347

                    So there is no way I can have a comment delimiter with a space, like hash and a space: ># < ?

                    1 Reply Last reply Reply Quote 0
                    • notepad347N
                      notepad347
                      last edited by

                      So there is no way I can have one line comment delimiter with a space, like hash and a space: ># < ?

                      Meta ChuhM 1 Reply Last reply Reply Quote 0
                      • Meta ChuhM
                        Meta Chuh moderator @notepad347
                        last edited by

                        @notepad347

                        So there is no way I can have one line comment delimiter with a space, like hash and a space: ># < ?

                        yes, you are correct.

                        side info: same applies to keywords in programming languages.
                        so for example a command/function name that can be highlighted is preg_replace but if it would be called preg replace the lexer would see it as 2 separate commands to be highlighted and highlight any occurrences of preg as well as any occurrences of replace, regardless if they are written together or not.

                        1 Reply Last reply Reply Quote 0
                        • notepad347N
                          notepad347
                          last edited by notepad347

                          thank you all for all the help, but I must say, notepad++ can be a pain, compare to sublime text I also use, you see, different tool for different tasks. But this community here is great, thanks.

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