• Login
Community
  • Login

adding auto space after typing

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
9 Posts 4 Posters 1.3k 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.
  • M
    midoune
    last edited by Jan 3, 2020, 1:59 PM

    hello
    i was wondering if there is an option in notepad++ that adds a space instaly after typing a certrain amount of alphabets like each 3 or 4 alphabets it instantly adds a space next to them .
    if possible please let me know how and have a nice day

    A 1 Reply Last reply Jan 3, 2020, 2:08 PM Reply Quote 0
    • A
      Alan Kilborn @midoune
      last edited by Jan 3, 2020, 2:08 PM

      @midoune

      Please explain the use-case for this? Give an example.

      1 Reply Last reply Reply Quote 0
      • M
        midoune
        last edited by Jan 3, 2020, 2:13 PM

        i know this might look funny but i use notepad to train my finger to play a rythm game in which i want to get used to some patterns by using multiple fingers for exemple
        i want to type a pattern that looks like this : HJHJ HJHJ HJHJ what i want is to make notepad add spacing each time i type HJHJ so that i can notice wether im doing right or miss typing

        1 Reply Last reply Reply Quote 0
        • P
          PeterJones
          last edited by Jan 3, 2020, 3:10 PM

          That sounds more like a task for a programming language than for a text editor. (You could probably find an example typing-tutor source-code somewhere, and modify it for your exact requirements.)

          I mean, you could do something like that in Notepad++ using the PythonScript plugin, which gives a Python interpreter direct access to the contents of the Notepad++ editor windows; but the extra hooks you’d have to program to make it work in that environment would be more effort than just programming a standard command-line script in Python or whatever your favorite programming language is; and in the end, that’s still mostly a programming challenge, not a Notepad+±specific challenge.

          As an alternative, include the SPACE key in what you are typing, and define a UDL that uses the HJHJ as a keyword highlighted GREEN (or similar); so if you were typing along, and had HJHJ HJHK HJHJ, then the first and third words would be green, and the center word would not.

          39c9411c-55d6-4ea2-874f-3c17a8fce896-image.png
          f8f0fa73-adce-4812-ad36-4d0a137e3679-image.png
          6543d1bb-b8b4-458d-ae09-490505ac323e-image.png

          1 Reply Last reply Reply Quote 2
          • M
            midoune
            last edited by Jan 3, 2020, 3:19 PM

            this seems like a brilliant idea i should try it for shure thanks for your help

            1 Reply Last reply Reply Quote 0
            • A
              Alan Kilborn
              last edited by Jan 3, 2020, 4:00 PM

              I get the feeling a troll is lurking here somewhere…

              1 Reply Last reply Reply Quote 0
              • D
                dreamforceinc
                last edited by Jan 4, 2020, 3:44 PM

                What about auto add a space after comma? For example - when I typing some function in C++.

                P A 2 Replies Last reply Jan 4, 2020, 9:16 PM Reply Quote 0
                • P
                  PeterJones @dreamforceinc
                  last edited by Jan 4, 2020, 9:16 PM

                  @dreamforceinc said in adding auto space after typing:

                  What about auto add a space after comma? For example - when I typing some function in C++.

                  @dreamforceinc, you’ve been around long enough to know where feature requests go.

                  As an alternative, PythonScript hooks can watch what you’re typing, and do replacements. I believe there were previous examples of such scripts which will watch for multiple-character sequences and replace them: a way of doing vi-like multi-character sequences (though that one doesn’t have a pythonscript, but references a plugin), or similarly for expanding \sometext into a special character or sequence of characters … I cannot think of the right search to find those right now, but I know there were more, and I’m sure there’s a pythonscript example which does that.

                  1 Reply Last reply Reply Quote 0
                  • A
                    Alan Kilborn @dreamforceinc
                    last edited by Jan 5, 2020, 1:50 PM

                    @dreamforceinc

                    This reference may be what @PeterJones was thinking of: https://community.notepad-plus-plus.org/topic/15970/can-i-make-notepad-auto-replace-a-string

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