Community
    • Login
    1. Home
    2. Help wanted · · · – – – · · ·
    Log in to post
    Load new posts
    • Recently Replied
    • Recently Created
    • Most Posts
    • Most Votes
    • Most Views
    • Tazhar0001T

      Find and replace a variable item

      Watching Ignoring Scheduled Pinned Locked Moved
      10
      0 Votes
      10 Posts
      5k Views
      PeterJonesP

      @Tazhar0001 said in Find and replace a variable item:

      Peter, is it possible to send you a private message of the .XML file I have? My knowledge in doing such a task is, minimal to say the least.

      There are no PM on this, and I don’t advertise my email address here (avoiding spambot harvesting).

      The [example data](https://community.notepad-plus-plus.org/post/50274 you showed near the start of this thread does work with the script I provided (well, I guess my previous post was missing the first line needed):

      from Npp import * def add_1(m): return (m.group(1)) + str(int(m.group(2)) + 1) + (m.group(3)) editor.rereplace('(lootmax=")([0-9]+)(")', add_1);

      Even with data like:

      lootmax="2" lootmax="4" lootmax="6" lootmax="1" lootmax="5" lootmax="9" <tag other="x" lootmax="2" /> <tag other="y" lootmax="4" /> <tag other="z" lootmax="6" /> <other>blah</interferes> <tag other="p" lootmax="1" /> <tag other="d" lootmax="5" /> <tag other="z" lootmax="9" />

      all the lootmax="#" get one added properly.

      If you need help with PythonScript

      Install PythonScript (if you don’t already have it): Plugins > Plugins Admin, check the box on ☐ PythonScript, and click Install; restart Notepad++ as needed Plugins > PythonScript > New script, named lootmax.py Paste the contents of the script from this post. Save. Set Notepad++'s active file to your file with the lootmax values. Run **Plugins > Python Script > Scripts > lootmax`; the replacement should occur.
    • Mark HarneyM

      How to remove all lines before a string value including the line with a string

      Watching Ignoring Scheduled Pinned Locked Moved
      5
      0 Votes
      5 Posts
      1k Views
      Mark HarneyM

      @PeterJones said in How to remove all lines before a string value including the line with a string:

      (?s).(?-s)^Content-Type: message/rfc822.\R{2}

      I had just tried with rfc822 and it did not work, but I have tried again with the string you gave me and it works. I really appreciate your help!

      Mark

    • Anurag SaksenaA

      How to create abbreviations for java code

      Watching Ignoring Scheduled Pinned Locked Moved
      29
      0 Votes
      29 Posts
      4k Views
      guy038G

      Hi, @michael-vincent, @peterjones and All,

      As you suggested, @michael-vincent, I removed the space char between the # symbol and the string LANGUAGE_NAME. But, after saving and restarting N++, the pseudo abbreviation tags #LANGUAGE_NAME=.... still appear in dialog, when choosing the Plugins > QucikText > Options... !?

      Luckily, it does not interfere with the abbreviation tags management of the last version 0.1.2.4 of the QuickText plugin, which remains correct ;-))

      Cheers,

      guy038

      P.S. :

      Actually, I just did an additional test, changing any line #LANGUAGE_NAME=.... into lines LANGUAGE_NAME=.... and, this time, these lines are not displayed in the Options dialog ;-))

    • J

      Function Parameter Hints - multiple overload tags - keyboard scrolling?

      Watching Ignoring Scheduled Pinned Locked Moved function hint keyboard scrolling function hint
      1
      1 Votes
      1 Posts
      213 Views
      No one has replied
    • WisTexW

      Pressing TAB key results in tabs in one document, but spaces in another

      Watching Ignoring Scheduled Pinned Locked Moved tab indent tab alignment tabs
      4
      0 Votes
      4 Posts
      526 Views
      Alan KilbornA

      This situation could also result from the use of the EditorConfig plugin, depending upon how it is configured with the .editorconfig files. Just sayin.

    • ?

      Notepad++ running as a service in windows 2012 R2?

      Watching Ignoring Scheduled Pinned Locked Moved
      3
      0 Votes
      3 Posts
      377 Views
      ?

      Thanks a lot for your advice!

    • Paulo MartinsP

      Replacing buttons with images

      Watching Ignoring Scheduled Pinned Locked Moved
      2
      0 Votes
      2 Posts
      277 Views
      Alan KilbornA

      @Paulo-Martins

      This should get you started…click HERE.

    • sepodeleS

      One line per 1000 items in a macro?

      Watching Ignoring Scheduled Pinned Locked Moved
      17
      2 Votes
      17 Posts
      2k Views
      sepodeleS

      Great stuff guys. It works like a charm! Thank you! :-)

    • CletosC

      How can I remove in a txt file all the spaces in each line after the last character?

      Watching Ignoring Scheduled Pinned Locked Moved
      5
      0 Votes
      5 Posts
      6k Views
      CletosC

      Thank you, andrecool-68,

      Works great.

      Hello guy038,

      That option does it very good as well, thank you. Thanks Alan.

    • Yves BruantY

      Where to find HexEditor.dllfor 64 bits W10 ?

      Watching Ignoring Scheduled Pinned Locked Moved
      2
      0 Votes
      2 Posts
      278 Views
      PeterJonesP

      Since HexEditor hadn’t been officially updated since 2009, @chcg has made an unofficial 64-bit port of HexEditor available at https://github.com/chcg/NPP_HexEdit/releases, with a couple of bugfix releases. The most recent x64 zipfile is the one you’ll want.

      For a normal Notepad++ installation, unzip HexEditor.dll into c:\Program Files\Notepad++\Plugins\HexEditor\HexEditor.dll, then reload Notepad++.

    • Siebe AlbersS

      Remove Keywords python language

      Watching Ignoring Scheduled Pinned Locked Moved
      4
      0 Votes
      4 Posts
      382 Views
      Siebe AlbersS

      @PeterJones Thank you! You helped me a lot with this.

    • mahesh ageerM

      How to add only one space at end of each line ?

      Watching Ignoring Scheduled Pinned Locked Moved
      6
      0 Votes
      6 Posts
      6k Views
      Alan KilbornA

      @mahesh-ageer

      You didn’t say anything about lines that already had some amount of spaces at their ends. Try to be complete with your problem description.

      I might be inclined to do that all in one step by searching for \x20*$ and replacing that with a single space.

    • Petr KurdiovskýP

      Replace data on specific position by data from 2nd file

      Watching Ignoring Scheduled Pinned Locked Moved
      7
      0 Votes
      7 Posts
      1k Views
      Petr KurdiovskýP

      Hi all, I found solution!
      1.Add 10 spaces at end of each lines in file X.REN by command $
      2.Copy rectangular selection 10 x number of lines in file X.REN
      3.Mark rectangular selection 10 x number of lines on target file in requested position and paste it.

    • bot ripB

      dont know

      Watching Ignoring Scheduled Pinned Locked Moved
      2
      0 Votes
      2 Posts
      222 Views
      Alan KilbornA

      @bot-rip

      This should get you started…click HERE.

    • Andy LightA

      Mass replace inside file at once

      Watching Ignoring Scheduled Pinned Locked Moved
      6
      0 Votes
      6 Posts
      2k Views
      Alan KilbornA

      @PeterJones said in Mass replace inside file at once:

      merge them manually in shortcuts.xml

      For you, yes, but for a casual Notepad++ user, maybe not.
      I was just pointing out that a bit of serious concentration when recording macros will go a long way in helping out. :-)

    • شعر Techش

      Replace every URL with the URL + text

      Watching Ignoring Scheduled Pinned Locked Moved
      8
      0 Votes
      8 Posts
      962 Views
      jcg3675J

      Glad to hear that it works! You don’t owe me anything. Just pay it forward to someone else when the time comes :)

    • Sarim JokhioS

      How To parse String to int in Java?

      Watching Ignoring Scheduled Pinned Locked Moved
      2
      0 Votes
      2 Posts
      221 Views
      Alan KilbornA

      @Sarim-Jokhio

      https://community.notepad-plus-plus.org/topic/15958/faq-desk-you-ve-asked-your-question-in-the-wrong-place

    • lionelanh97L

      How to remove all text after specific text with rule for each line?

      Watching Ignoring Scheduled Pinned Locked Moved
      4
      0 Votes
      4 Posts
      526 Views
      guy038G

      Hello, @lionelanh97, @terry-r and All,

      @terry-r, I don’t think that the look-ahead structure, (?= //) is, even, mandatory !

      This regex S/R should be enough :

      SEARCH (?-si)//Converted.+\K //.+

      REPLACE Leave EMPTY

      As it searches the greatest range of chars .+ between the string //Converted and the string ' //', without the quotes !

      Best Regards,

      guy038

    • Louis GoL

      How to open specific files in different folder where root folder might be varied. Open File in Solution is my temporary solution.

      Watching Ignoring Scheduled Pinned Locked Moved
      8
      0 Votes
      8 Posts
      1k Views
      Alan KilbornA

      @Alan-Kilborn said in How to open specific files in different folder where root folder might be varied. Open File in Solution is my temporary solution.:

      It sounds to me like a scripting plugin is needed to solve this problem.

      Batch file scripting. The plugin-less scripting! :-)

    • Phillip AndelsonP

      Mid Line Comments for Fortran

      Watching Ignoring Scheduled Pinned Locked Moved
      3
      0 Votes
      3 Posts
      282 Views
      Phillip AndelsonP

      @PeterJones Thanks for the reply!

    The Community of users of the Notepad++ text editor.
    Powered by NodeBB | Contributors