• Open long path/ file name error since 7.5.9

    10
    0 Votes
    10 Posts
    5k Views
    Tom_Cox001T

    I suggest you try Long path tool is the very good

    program for easily delete, copy & rename long path

    files, error, unlock solution.
    Try it and solve your problem.

  • Logging in to Notepadd++ Community

    8
    0 Votes
    8 Posts
    1k Views
    donhoD

    Thanks Andrew Rodrigues (NodeBB support team), the login page has been reworded to “Available Logins” now:
    https://community.notepad-plus-plus.org/login

  • Odd Query Regarding Sessions & Preferences

    10
    1 Votes
    10 Posts
    395 Views
    Alan KilbornA

    @Miss-Chief said in Odd Query Regarding Sessions & Preferences:

    You think multiple instances would impact it?

    Yes, I think it could. Each instance shares the same settings, and the instance you close LAST will write the settings.

    So say you have 2 instances open, call them A and B. If you go into instance A’s settings and you turn off the tool bar, instance A’s tool bar will (obviously) not be shown but instance B will still have a tool bar.

    If you then quit instance A and then quit instance B and then restart Notepad++, what you get will have a tool bar.

    However, if you had quit instance B and then quit instance A and then restarted, what you get will NOT have a tool bar.

    I don’t think the automatic session management stuff works the same way as a setting like the tool bar, at least a quick test didn’t show that it did, but…

    I avoid this sort of multi-instance running myself, for these types of reasons.

    At most I ever want/need is one additional instance, so I have a secondary portable version of Notepad++ hanging around for just such a need. I have a Run menu item set up to run this secondary instance from my main instance. Since both instances have totally different settings and sessions, I don’t have any problems. Such a setup is convenient for me, but I recognize that it isn’t necessarily convenient for everyone.

  • 0 Votes
    10 Posts
    442 Views
    juon2ndJ

    Thank you, thank you, thank you! Terry’s last solution did the trick. Thanks for the elaborate explanations, I’ll learn more about regex later when I have the time, for now by doing this simple search I killed at least a thousand times of repetitive CTRL V and can smoothly proceed with my translation.
    Cheers

  • Drag-and-Drop Code with Connecting Operators

    1
    0 Votes
    1 Posts
    207 Views
    No one has replied
  • Unable to change caret color

    3
    0 Votes
    3 Posts
    337 Views
    PeterJonesP

    @Emory-Colvin said in Unable to change caret color:

    came back to it later and it was fixed

    I am glad it’s working for you now.

    Apparently it can’t keep up with realtime changes to the formatting.

    Just so you know, mine changes the color of the cursor immediately; I am wondering if you have a huge file, or many large files open, or something like that.

  • Select all text on all open files?

    5
    0 Votes
    5 Posts
    1k Views
    EkopalypseE

    Not quite sure I understand.
    The workflow is like this

    get number of open files (NPPM_GETNBOPENFILES) retrieve the bufferids for these files (NPPM_GETOPENFILENAMESPRIMARY/NPPM_GETOPENFILENAMESSECOND, NPPM_GETBUFFERIDFROMPOS) activate the bufferids (NPPM_ACTIVATEDOC) read the content (SCINTILLA API GetTextT)
  • 0 Votes
    5 Posts
    432 Views
    felad0001F

    I haven’t no. I’m not familiar with macros in Notepad++, but it surely sounds like a good idea. I’ll try to give it a try :)

    Thanks

  • 0 Votes
    6 Posts
    481 Views
    Alan KilbornA

    @NemoNobobyPersonne

    Are you trying to tell us that you are just getting around to following up on an issue you opened 16 months ago?

  • I want to use the 'Uncollapse Current Level' shortcut.

    2
    0 Votes
    2 Posts
    730 Views
    EkopalypseE

    @정태곤

    Sorry, but hard to understand what your issue is.
    Could you please explain a little bit more precisely
    what works and when not?

  • Why does "Find result" window tab icon look like it does?

    11
    0 Votes
    11 Posts
    464 Views
    EkopalypseE

    Too much time and nothing works as expected, results in gifs and gifs and even more gifs :-)

  • How to Find all comma and replace it with a Hard Return (HRT)

    4
    0 Votes
    4 Posts
    564 Views
    Robert Long 0R

    @PeterJones Awesome! Thank you
    I forgot to do Regular Expression

    Thank you for the quick reply

  • Regex: Find all files that do not contain some words

    12
    -1 Votes
    12 Posts
    25k Views
    Alan KilbornA

    Cross-link to perhaps a better solution:
    https://community.notepad-plus-plus.org/post/51935

  • Cant load my code in Chrome

    3
    0 Votes
    3 Posts
    280 Views
    PeterJonesP

    @Aadil-Sohail ,

    I am going to take a wild guess (though you weren’t very clear in your original post), since you included the Notepad++ specific shortcuts.xml reference, that you are editing your website code (assumed HTML) in Notepad++, and used Run > Launch In Chrome to view your website in a browser.

    I am further going to assume that you named your file blah rather than blah.html, because then Chrome would have no reason in the world to assume that the underlying bytes were meant to be html, and would thus show you the raw source code, rather than rendering the HTML. I am going to assume that Microsoft, in their Edge browser, like in many other Microsoft products, assumes it knows better than the user what should really happen, and ignores the filetype, and instead guesses at the “real” filetype, even when you pass it a file with no extension

    Fortunately, if I am right, Notepad++ will be very useful, because it will show the full file path, including directory, name, and extension, in the title bar (unless you have set Settings > Preferences > MISC to enable Show only filename in title bar as described in the official preferences documentation – if so, disable that). Or you can hover over the tab name, and the full path, name, and extension will be shown. If I am right, use File > Rename to fix the name to actually include .html in the name.

    I could be wrong, however, because you gave us next to nothing to go on. Or Alan could be right, and you were actually asking an HTML/webcoding question rather than asking a question specific to Notepad++.

    But I’m hoping that my wild guess is right, and I’ve been able to help you, despite your lack of information. Or that, at the very least, it will encourage you to provide more information so that we can help you. (Though if it’s an HTML question, Alan is right, and this isn’t the right place)

  • Spell Check not showing suggestions

    1
    0 Votes
    1 Posts
    159 Views
    No one has replied
  • 0 Votes
    10 Posts
    1k Views
    guy038G

    Hello, @John-slee,

    Ah, of course, if you want to capture part(s) of the regex, needed in replacement, you need to surround these parts with parentheses. In that case we have to change the non-capturing group (?s:.+?) into a capturing group, with the in-line modifier inside so the new syntax ((?s).+?)

    So the final regex would be :

    SEARCH (?-s)(^==.+\R)((?s).+?)(?===|\Z)

    with two groups :

    The header line with its EOL ( group 1 )

    The subsequent lines of each block, with their line-breaks ( group 2 )

    However, as you said :

    so that it captures the Header line (without the EndofLine)

    This final regex should be :

    SEARCH (?-s)(^==.+)\R((?s).+?)(?===|\Z)

    Best Regards

    guy038

  • Remove duplicate lines in separate files

    7
    0 Votes
    7 Posts
    2k Views
    Terry RT

    @Sarah-Duong said in Remove duplicate lines in separate files:

    This is really difficult for me.

    Well, you have presented quite a significant problem, mainly due to the size. The actual process (as I’ve outlined previously) is not difficult, but given the number and size of the files the solution will take some effort by you to complete.

    So do you want a solution in the Windows environment or were you considering the Linux solution in which case this thread (collection of posts) can close?

    You say the average filesize is 200000 lines, if we suggest an average of 18 (you said 5 to 30 characters per line) characters per line this makes an average filesize of 3.6MB. I haven’t personally worked on a file of this size, however I’m sure NPP is capable of filesizes much larger. It can depend upon the environment such as whether NPP used is 32bit or 64bit, and whether you have additional plugins loaded.

    I still think it will only be possible to use NPP is the files are broken down into groups which will mean sorting each file first and breaking them apart by the first 1 or 2 characters. Then processing each group separately.

    Please advise whether you still want to consider this approach, we (on the forum) can help you, but be aware it will be a lengthy job.

    Terry

  • 0 Votes
    5 Posts
    967 Views
    guy038G

    Hi, @garbage-gold, @astrosofista, @alan-kilborn and All,

    Again, I would use a combination of regex S/R and the column Editor feature !

    So, from the input text, below :

    358 293 866 511 58 767 562 644 163 569 414 305 973 16 692 128 353 1000 870 58 535

    Using the following regex S/R :

    SEARCH (?-s)^(.+)\R(.+)\R(.+)

    REPLACE @@@@\1\t\2\t\3

    we get the text, with words separated by a TAB char :

    @@@@358 293 866 @@@@511 58 767 @@@@562 644 163 @@@@569 414 305 @@@@973 16 692 @@@@128 353 1000 @@@@870 58 535

    Now, place the caret after the two first @ characters of the first line

    And using the column editor ( Alt + C ) and inserting a list of numbers, beginning with 1, we obtain :

    @@1@@358 293 866 @@2@@511 58 767 @@3@@562 644 163 @@4@@569 414 305 @@5@@973 16 692 @@6@@128 353 1000 @@7@@870 58 535

    Finally, using the simple S/R :

    SEARCH \t

    REPLACE \r\n ( or \n only for Unix files )

    You’ll have your expected text :

    @@1@@358 293 866 @@2@@511 58 767 @@3@@562 644 163 @@4@@569 414 305 @@5@@973 16 692 @@6@@128 353 1000 @@7@@870 58 535

    Best Regards,

    guy038

  • How to add the numbers in sequence to specific text;

    3
    0 Votes
    3 Posts
    759 Views
    guy038G

    Hello, @garbage-gold, @astrosofista and All,

    Of course, regexes cannot perform, generally, mathematical operations, but we can cheat a bit !

    First, open the Replace dialog

    SEARCH (?<=\d)\R ( or (?<=\w)\R if your text contains words instead of numbers )

    REPLACE \t

    If necessary, tick the Wrap around option

    Select the Regular expression search mode

    Click on the Replace All button

    => Your text in changed as below, with a TAB char between each word :

    358 293 commit; 866 511 commit; 58 767 commit; 562 644 commit; 163 569 commit; 414 305 commit;

    Notes

    This regex S/R looks for any EOL character(s), which is/are preceded with a number ( (?<=\d) ) ( or a word if (?<=\w) )

    And replaces it with a tabulation character ( \t )

    Now, put the caret at the end of the first line

    Open the column editor ( Alt + C )

    Select Number to Insert

    Type in 1 in all the zones

    If necessary, tick the Leading zeros option

    Click on the OK button

    Remove additional numbers on possible empty lines, at the end of the list

    You should get :

    358 293 commit;1 866 511 commit;2 58 767 commit;3 562 644 commit;4 163 569 commit;5 414 305 commit;6

    Finally, perform the last regex S/R, below :

    SEARCH \t

    REPLACE \r\n ( or \n only for Unix files )

    Here is your expected text :

    358 293 commit;1 866 511 commit;2 58 767 commit;3 562 644 commit;4 163 569 commit;5 414 305 commit;6

    Et voilà !

    Best Regards,

    guy038

  • 0 Votes
    5 Posts
    419 Views
    Rarder RR

    @Terry-R Thank you. I tried the way you suggested and it worked.