• Mass replace inside file at once

    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. :-)

  • Replace every URL with the URL + text

    8
    0 Votes
    8 Posts
    951 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 :)

  • How To parse String to int in Java?

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

    4
    0 Votes
    4 Posts
    499 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

  • 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! :-)

  • Mid Line Comments for Fortran

    3
    0 Votes
    3 Posts
    264 Views
    Phillip AndelsonP

    @PeterJones Thanks for the reply!

  • Clean duplicated IPs from file

    2
    0 Votes
    2 Posts
    411 Views
    Alan KilbornA

    @Simon-Belmar

    Sort first, then remove consecutive duplicates?

    See Edit menu, Line Operations sub-menu for some tools available for you?

  • Keep only the ips in a file

    3
    0 Votes
    3 Posts
    1k Views
    Simon BelmarS

    Thanks PeterJones! Works perfectly

  • Hang when share disconnected

    2
    0 Votes
    2 Posts
    285 Views
    gstaviG

    The simple answer (that you would no like) is: in Preferences->Backup disable Remember current session for next run.

    Essentially Notepad++ deals with files and their paths. Notepad++ is not aware that some specific path refers to a network share. The hang you observe is until Windows network stack give up with timeout.
    Perhaps if you did use drive letter Windows would realize that the letter is unconnected faster than with UNC.

  • -1 Votes
    6 Posts
    2k Views
    Elijah 5801E

    Almost 2 years ago on 10 March 2018, I asked the community for help on using EXPRESSION mode.
    Within 3 days I got replies from several people.
    I documented this page to remind me of the ANSWERS and the MEMBERS who replied.
    It’s now nearly two years later, and I consider myself a PRO with the amount of work I achieved.
    The amount of work which would normally take me a year to complete, was reduced to just a few seconds.
    From the little you taught me that day in March 2018, opened more doors to more wisdom using the EXPRESSION mode, and I have achieved even far greater things in the last two years.
    If it were not for the great outpouring of help from volunteers like the people who helped me on my way in March 2018, I would still be living in the dark ages labouring away, the long way.
    Thank you! You have no concept of what I achieved by the little SEED of wisdom you planted in me that day.
    So I THANK YOU AGAIN!!!

  • Convert 12 hour time to 24 hour time

    9
    0 Votes
    9 Posts
    2k Views
    Alan KilbornA

    You did not answer my initial question

    You did not answer to my question, at the very beginning of my previous post

    Sensing a theme here.

  • UDL fails to highlight operator depending on trailing character?

    5
    0 Votes
    5 Posts
    379 Views
    PeterJonesP

    @Jared-123 said in UDL fails to highlight operator depending on trailing character?:

    That is an awful forum design decision

    In your opinion.

    From a security and maintenance standpoint, it is an excellent decision, and I applaud it. If the Community Forum had to maintain its own database of user-to-password, then the Community Forum admin team (or person) would have to personally ensure security, making sure the server never gets hacked, responding to hacking threats, making updates, etc

    Instead, by using a common and open-source OAuth mechanism through multiple of the major OAuth providers, all the security is maintained by the mega-corps, who have a vested interest in keeping the login credentials secure, and have paid staff with job descriptions including maintaining that security.
    The Notepad++ Community could never provide anything as secure as that.

    With the resources of a Google, Facebook, Stack Exchange, or similar, and professional security experts on your team, it makes sense to control everything to that depth; for a mom-and-pop (or Don-and-friends) group like the Notepad++ Community, it just doesn’t – and when (not if) the home-rolled security was broken, you would be singing a very different tune.

  • Remove " quotes from tsv file

    4
    0 Votes
    4 Posts
    1k Views
    guy038G

    Hi, christopher-phillips,

    Thanks ! So, here is the road map, with a regex S/R :

    Open the Replace dialog ( Ctrl + H )

    SEARCH (^|(?<=\t))"|"((?=\t)|$)|"(?=")

    REPLACE Leave EMPTY

    Tick the Wrap around option, if necessary

    Select the Regular expression search mode

    Click, exclusively, on the Replace All button

    Notes :

    This search regex contains 3 alternatives, separated with the alternation symbol | :

    The first part (^|(?<=\t))" searches for a double quote, only if at beginning of line or preceded with a tabulation char ( \t )

    The second part "((?=\t)|$) searches for a double quote, only if followed with a tabulation char or an end of line

    The last part "(?=") searches for a double quote, only if followed with a second double-quote

    As the replacement zone is Empty, the double-quote selected, whatever the alternative, is simply deleted

    Best Regards,

    guy038

  • FIND & REPLACE

    3
    0 Votes
    3 Posts
    847 Views
    PeterJonesP

    I was curious: there is a trick in windows batch files to create a random number of a specific number of digits between 1 and 4. For anything longer than that, you could concatenate.

    To get a three-digit number (from 100-999):

    set /A RAND=%RANDOM% %% 900+10

    To get a 15-digit number (never starting with 0), concatenate 5 of those together (so you could define R1 through R5, and then %R1%%R2%%R3%%R4%%R5%.

    Of course, in your original question, the search-and-replace would have to include the multiline replace to insert the 5 set /A commands before each ren command, but I’ll leave that as an exercise to the reader. I still maintain, however, that PythonScript (or an external python program – or other language) would be better than trying to hack it with search-and-replace.

  • php function/term hint not working after update

    2
    0 Votes
    2 Posts
    239 Views
    EkopalypseE

    @Sloan-Thrasher-0

    Do you see the the autoCompletion folder? Is there a php.xml with content?
    Can you post your debug-info from the last menu item, the ? menu?

  • Python auto-indent

    6
    0 Votes
    6 Posts
    4k Views
    EkopalypseE

    @Alan-Kilborn

    Note, I do have autoindent disabled in order to make this work.
    Because I know you are doing python, I haven’t refactored anything,
    but I guess it’s mostly getting rid of self to make this work in a non-class way.
    Concerning the todo, no, I haven’t looked at it since then.

    def __init__(self): self.excluded_styles= [1, 3, 4, 6, 7, 12, 16, 17, 18, 19] def on_modified(self, args): # TODO: text == \r even if \r\n is assumed, but length is 2, is this a bug?? Or am I doing something wrong? if args['modificationType'] & 0x100000 == 0x100000 and args['text'] in ['\r','\n']: text = '\r\n' if args['length'] == 2 else args['text'] self._indent(args['position'], text) def _indent(self, position, text): if self.is_python and self.auto_indent: indent = editor.getLineIndentation(editor.lineFromPosition(position)) if (editor.getCharAt(position-1) == 58 and # 58 == : editor.getStyleAt(position-1) not in self.excluded_styles): tabwidth = editor.getTabWidth() text += ' '*(indent//tabwidth+1)*tabwidth else: text += ' '*indent editor.changeInsertion(text)
  • 1 Votes
    18 Posts
    2k Views
    EkopalypseE

    @jcg3675
    Thank you very much and yes, there is time when a microwave becomes the best invention since sliced bread :-)

    Let me know how it goes!

    I sure will do.

  • Hex editor plugin crashes Notepad++ on startup when opening nfo files

    7
    0 Votes
    7 Posts
    2k Views
    PeterJonesP

    @Fourbits,

    I said,

    at home, I think I have a virtual windows machine

    Sorry, I didn’t get a chance until this weekend.

    I spun up the VM, and did a fresh install of v7.8.4-32bit. I can confirm your symptoms.

    I ran the five experiments I suggested:

    Experiment cmd.exe: hmm, the default “Edit With Notepad++” connects to DLL, not EXE. Still, "c:\Program Files (x86)\Notepad++\notepad++.exe" file.nfo crashes Experiment autodetect: turn encoding autodetect off: crashes Experiment 1: remove extension from langs.xml: Fresh RClick is okay Experiment 2: associate with Search Results rather than DosStyle: Fresh RClick is okay Experiment 3: associate with dummy UDL “PlainNFO”: Fresh RClick is okay

    So, any of the three experiments which tried to convince Notepad++ that a .nfo file wasn’t MSDOS-Style/ASCII-ART was successful in preventing the crash.

    If you do not need the default lexer trying to apply the default color of black on white to all text (ie, doing nothing helpful), I’d suggest implementing one of those three options to get around the buggy interaction between HEX-Editor Plugin and Notepad++'s NFO lexer.

  • find and replace

    2
    0 Votes
    2 Posts
    232 Views
    Alan KilbornA

    I would be tempted to try a Regular Expression Search Mode replacement operation, looking for (?-si)^([CON])(\(P.+?\)) and replacing with \1\(Fragment=1\).

    Let us know how that goes for you.

  • Run as administrator and document encodings

    2
    0 Votes
    2 Posts
    231 Views
    Alan KilbornA

    @octopoesie

    When you think you should be in administrator mode, does the title bar of Notepad++ have the word Administrator in it?

    Encodings are tough things to deal with…so, no comment. :-)