• Is there a distraction-free writing mode like Vimroom(a plugin of Vim)?

    15
    0 Votes
    15 Posts
    3k Views
    EkopalypseE

    @Alan-Kilborn

    :-( there is unfortunately no candy for me, as I am still on Windows7 :-(

  • Distraction-free mode

    4
    0 Votes
    4 Posts
    4k Views
    donhoD

    FYI:
    This feature will be in the next release (v7.9.6).

    5726c59e-2b26-4f74-a358-f242c2aa9092-image.png

  • How to create notepad++ log file to attach to issue report?

    2
    1 Votes
    2 Posts
    496 Views
    PeterJonesP

    @Oliver-Meyer said in How to create notepad++ log file to attach to issue report?:

    I assume it is related to the network location of the last closed file or something.

    That is a good guess. If Notepad++ cannot see the network location for files in the current session, or sometimes for files in the recent files history, then it can get confused.

    For the recent files history, there is a setting which influences it: Settings > Preferences > Recent Files History > ☑ Don’t check at launch time. By clicking that checkbox, Notepad++ will not try to verify whether or not the MRU files still exist.

    Is there a way to increase log level and create a useful log file to attach to an issue report?

    Not that I’ve ever seen or heard of.

  • 0 Votes
    9 Posts
    357 Views
    some oneS

    @Ekopalypse Thank you very much!

  • 0 Votes
    9 Posts
    383 Views
    Vasile CarausV

    Also, you can try:

    SEARCH: (\w+\W+){48}
    REPLACE BY: $0\r\n\r\n

  • How to add "Save As" to TOOL BAR ?

    5
    0 Votes
    5 Posts
    544 Views
    Alan KilbornA

    @Jack-Ski said in How to add "Save As" to TOOL BAR ?:

    Is the TOOL BAR customizable ?

    Read Terry’s previous response.

    Another option: Default keycombo for SaveAs is Ctrl+Alt+s

  • Remove Line Numbers from Margin

    8
    0 Votes
    8 Posts
    12k Views
    Alan KilbornA

    @Robk-Blue said in Remove Line Numbers from Margin:

    just the pointless activity of developers changing something for changes sake.

    This is a rather bold statement. I mean, how do you know if it was a pointless change, just to change something? Hmm, well even typing that sounds stupid, because what developer would waste their time to do that?

    Have you investigated the history on it and come to that conclusion with some evidence that it is so?

    Oh wait, my grandmother always told me to “consider the source”. And this source said:

    I looked repeatedly through the preferences but somehow missed it

    Dude, as Terry shows you in the screenshot, it is right there in a well-named box called Line Number and has a first element called Display, so…seriously?

    BTW, my previous comment in this thread was tongue-in-cheek: I was calling you out because there is absolutely nothing wrong with the Preferences UI for this.

  • Find in files, copy filenames

    6
    0 Votes
    6 Posts
    1k Views
    guy038G

    Hi, @dan-walter, @peterjones, @alan-kilborn and All,

    For people who are wondering :

    Why doesn’t use the usual . regex char to match a standard character of the BMP ?

    Why does he care about characters with Unicode code-point > U+FFFF ?

    Well, regarding the first question :

    Some characters, like the Form Feed character ( \x0C - \f ), are not matched by the regex Dot char !

    Some characters as FF - Form Feed \x000C, NEL - NEw Line \x{0085}, LS - Line Separator \x{2028}, PS - Paragraph Separator \x{2029} act in the same way as the classical EOL chars ( \r and/or \n ). So, the ^ assertion matches right after these characters and the $ assertion matches right before these characters !

    Consequently, the simple regex [^\r\n] seems the best syntax to match all characters of the Unicode Basic Multilingual Plane but the two \r and \n chars !

    Now, regarding the second question :

    When a file is UTF-8 encoded, it may contain characters with Unicode code-point > U+FFFF ( according to a 4 bytes sequence for each char ). Unfortunately, the usual regex syntax . cannot find these characters.

    After some tests, the BOOST regex .[\x{D800}-\x{DFFF}] syntax seems to match correctly all these characters over the BMP.

    Although I don’t have any clear explanation for this syntax, I suppose that it’s certainly related to the surrogate pair mechanism, used to express these characters in two-bytes encoded files !

    So, here is the third question, from Alan :

    Why the result contains the first line : Search "•••••" (••••• hits in ••• files of ••• searched) ?

    Well, to my mind, this first line seems rather informative. This is the only reason why I kept this line, in the final result !

    Now to be rigorous, and in order to delete the leading space chars before the absolute paths, too, prefer this regex S/R :

    SEARCH (?-s)^\t(?:[^\r\n]|.[\x{D800}-\x{DFFF}])+\R|^\x20\x20(.)|\A.+\R

    REPLACE ?1\1

    Oh… wait a minute ! Here is an other method, much more simple ;-)) However, you need, at least, N++ release v7.9.1

    Perform your search with, either, the buttons Find All in Current Document, Find All in All Opened Documents or Find All

    Once the Search Results panel opened, right-click in any location of the Search Results panel

    Choose the Select All option

    Choose the Copy option ( not the Copy Selected Line(s) option )

    Click on the Esc key to close the Search Results panel

    Open a new tab ( Ctrl + N )

    Paste all the clipboard contents with Ctrl + V

    Open the Mark dialog ( Ctrl + M )

    SEARCH ^\x20\x20\K.+(?=\x20.*\d.*$)

    Untick all the square box options

    Tick the Wrap around option

    Select the Regular expression search mode

    Click on the Mark All button

    Click on the Copy Marked Text button

    Click on the Esc key to close the Mark dialog

    Open, again, a new tab ( Ctrl + N ) or replace the contents of the present new tab

    Paste all the clipboard contents with Ctrl + V

    Et voilà ! Done ;-))

    Best Regards,

    guy038

    P.S. :

    Each line displayed :

    Always begins with 2 space characters ( hard-coded )

    Is followed with an absolute path which may contain some space chars and other characters than word chars !

    Followed with 1 space character ( hard-coded )

    Ending with the default text (# hits) where # stands for any mandatory integer number

    However, as the text, after each absolute path is now translatable, we must consider various possibilities. Here are, below, some of these :

    D:\@@\Doc N++\Abc def_789(012).txt 1 D:\@@\Doc N++\Abc def_789(012).txt 1 D:\@@\Doc N++\Abc def_789(012).123 1 D:\@@\Doc N++\Abc def_789(012).123 1 D:\@@\Doc N++\Abc def_789(012) 1 D:\@@\Doc N++\Abc def_789(012) 1 D:\@@\Doc N++\Abc def_789(012).txt 1 hits D:\@@\Doc N++\Abc def_789(012).txt 1 hits D:\@@\Doc N++\Abc def_789(012).123 1 hits D:\@@\Doc N++\Abc def_789(012).123 1 hits D:\@@\Doc N++\Abc def_789(012) 1 hits D:\@@\Doc N++\Abc def_789(012) 1 hits D:\@@\Doc N++\Abc def_789(012).txt 456 D:\@@\Doc N++\Abc def_789(012).txt 456 D:\@@\Doc N++\Abc def_789(012).123 456 D:\@@\Doc N++\Abc def_789(012).123 456 D:\@@\Doc N++\Abc def_789(012) 456 D:\@@\Doc N++\Abc def_789(012) 456 D:\@@\Doc N++\Abc def_789(012).txt 456 hits D:\@@\Doc N++\Abc def_789(012).txt 456 hits D:\@@\Doc N++\Abc def_789(012).123 456 hits D:\@@\Doc N++\Abc def_789(012).123 456 hits D:\@@\Doc N++\Abc def_789(012) 456 hits D:\@@\Doc N++\Abc def_789(012) 456 hits D:\@@\Doc N++\Abc def_789(012).txt (1) D:\@@\Doc N++\Abc def_789(012).txt (1) D:\@@\Doc N++\Abc def_789(012).123 (1) D:\@@\Doc N++\Abc def_789(012).123 (1) D:\@@\Doc N++\Abc def_789(012) (1) D:\@@\Doc N++\Abc def_789(012) (1) D:\@@\Doc N++\Abc def_789(012).txt (1 hits) D:\@@\Doc N++\Abc def_789(012).txt (1 hits) D:\@@\Doc N++\Abc def_789(012).123 (1 hits) D:\@@\Doc N++\Abc def_789(012).123 (1 hits) D:\@@\Doc N++\Abc def_789(012) (1 hits) D:\@@\Doc N++\Abc def_789(012) (1 hits) D:\@@\Doc N++\Abc def_789(012).txt (456) D:\@@\Doc N++\Abc def_789(012).txt (456) D:\@@\Doc N++\Abc def_789(012).123 (456) D:\@@\Doc N++\Abc def_789(012).123 (456) D:\@@\Doc N++\Abc def_789(012) (456) D:\@@\Doc N++\Abc def_789(012) (456) D:\@@\Doc N++\Abc def_789(012).txt (456 hits) D:\@@\Doc N++\Abc def_789(012).txt (456 hits) D:\@@\Doc N++\Abc def_789(012).123 (456 hits) D:\@@\Doc N++\Abc def_789(012).123 (456 hits) D:\@@\Doc N++\Abc def_789(012) (456 hits) D:\@@\Doc N++\Abc def_789(012) (456 hits) D:\@@\Doc N++\Abc def_789(012).txt ( 1 ) D:\@@\Doc N++\Abc def_789(012).txt ( 1 ) D:\@@\Doc N++\Abc def_789(012).123 ( 1 ) D:\@@\Doc N++\Abc def_789(012).123 ( 1 ) D:\@@\Doc N++\Abc def_789(012) ( 1 ) D:\@@\Doc N++\Abc def_789(012) ( 1 ) D:\@@\Doc N++\Abc def_789(012).txt ( 1 hits ) D:\@@\Doc N++\Abc def_789(012).txt ( 1 hits ) D:\@@\Doc N++\Abc def_789(012).123 ( 1 hits ) D:\@@\Doc N++\Abc def_789(012).123 ( 1 hits ) D:\@@\Doc N++\Abc def_789(012) ( 1 hits ) D:\@@\Doc N++\Abc def_789(012) ( 1 hits ) D:\@@\Doc N++\Abc def_789(012).txt ( 456 ) D:\@@\Doc N++\Abc def_789(012).txt ( 456 ) D:\@@\Doc N++\Abc def_789(012).123 ( 456 ) D:\@@\Doc N++\Abc def_789(012).123 ( 456 ) D:\@@\Doc N++\Abc def_789(012) ( 456 ) D:\@@\Doc N++\Abc def_789(012) ( 456 ) D:\@@\Doc N++\Abc def_789(012).txt ( 456 hits ) D:\@@\Doc N++\Abc def_789(012).txt ( 456 hits ) D:\@@\Doc N++\Abc def_789(012).123 ( 456 hits ) D:\@@\Doc N++\Abc def_789(012).123 ( 456 hits ) D:\@@\Doc N++\Abc def_789(012) ( 456 hits ) D:\@@\Doc N++\Abc def_789(012) ( 456 hits )

    You can verify that the regex ^\x20\x20\K.+(?=\x20.*\d.*$) matches most of these lines. Unfortunately, it’s not perfect because, in the third part, it matches the opening bracket and the blank chars before it :-((

    You could say : in the range of characters .+, we should not allow an opening bracket right after a space char. But, if you do so, how to match, for instance, a file with name Abc (012 !? In this case, only the Abc part would be matched :-(

    In short, the present regex ^\x20\x20\K.+(?=\x20.*\d.*$) may catch some extra characters, in rare occasions. But, knowing the filenames you’re dealing to, it should not be difficult to correct the syntaxes of these few erroneous paths ;-))

  • What is this 'SO' marker at the end of the line?

    5
    0 Votes
    5 Posts
    301 Views
    EkopalypseE

    @Robert-Prochowicz

    sorry, you are right, it is SO, 0x0E not SOH.
    I don’t know why this is needed today?
    It is certainly not needed for plain text.

  • Disable all Notepad++ keyboard shortcuts?

    3
    0 Votes
    3 Posts
    391 Views
    Charles Anon 0C

    OK, thanks!

  • javascript back-tick quoted strings bad color

    16
    1 Votes
    16 Posts
    13k Views
    Alan KilbornA

    @Lajos-Mészáros said in javascript back-tick quoted strings bad color:

    Having to fiddle around with the colors in the settings just to not have white text on the active line, which is also colored with white background is a bummer,

    Well, “bummers” in life exist. Perhaps consider how many positive things have come from your usage of N++, and reconsider how much of a bummer something like what you are talking about is.

    But… unless you are going to provide more information, perhaps about what theme you are using (and BTW, if you are choosing a non-default theme you are “slowing yourself down” instead of getting to work “immediately” on a new PC), then I don’t think anyone is going to be able to help more than Peter already has.

    I see the same results as Peter, that is, no issue. I even “scrolled thru” all of the themes that N++ offers in order to try and see the effect you are observing, and I can’t duplicate it. A trick to quickly evaluate all of the themes is to set up your conditions (in this case (backtick)test${1234}test(backtick) in a JavaScript file) and then open the Style Configurator and point to the Select theme: dropdown, and, here’s the key part: scroll the mouse wheel.

  • How can we reverse words in a row

    8
    0 Votes
    8 Posts
    2k Views
    PeterJonesP

    @Mou-Nir said in How can we reverse words in a row:

    Thank you sir peter for the help, but I’ve faced a small issue which is as follow:

    You said “word”. You should not be surprised that it didn’t work for multiple “words” on each side of the |.

    Here’s another freebie – but it’s the last from me. The quality of replies is only as good as the quality of your question. If you don’t understand your data well enough to explain it correctly to us, there is no way we would be expected to guess it.

    FIND = (?-s)^(.*?)\|(.*?)$

    Everything else from my previous solution remains the same.

    This will swap everything on the left of the first | on a line with everything to the right of the first | on the line.

    And, as Alan said, it is difficult to hit a moving target. I have re-aimed once already, and am not likely to do so again.

    If you want to do more fancy search-and-replace in the future, your best bet is going to be to study the documentation I’ve already linked.

  • how to add printf(); after each line.

    4
    0 Votes
    4 Posts
    507 Views
    PeterJonesP

    @Kamal-lochan-0 ,

    how can i run and use this script ?

    By following the clear, step-by-step instructions that you just linked to.

    please provide the screen capture

    That post you linked was pretty explicit about the steps necessary. But if screen captures are needed, I will intersperse them between the quoted version of the plain text instructions from that post:

    Use Plugins admin to install the PythonScript plugin

    a3c12d0c-4c77-4ca5-996e-5d3373ba19e6-image.png

    Menu to Plugins > Python Script > New Script

    512db8aa-3d1f-4e05-81b7-b0f4dbde84f1-image.png

    Provide a (file) name for the script; you don’t need to specify an extension – .py will be added automatically Press the Save button to close out the Save As dialog box.

    98d60736-7684-4a9c-b8ee-980da87ac037-image.png

    At this point your script file will be showing and is empty; copying and pasting one of the scripts from above seems like a fine idea :-)

    after pasting, it will look like:

    eaa461d0-85d0-40e3-b54c-3f30ad93e493-image.png

    Please note: your post lost the leading spaces when you quoted the script. In Python, indentation carries meaning, so make sure you actually copy/paste the text from my post, not from yours that has lost the spaces. If you disregard this advice, it will not work. It should look like the screenshot above.

    Save the file

    cff43f73-a456-4086-9372-c7d495feb887-image.png

    or

    8ea24b13-e7a4-472f-9ffc-6bbcf41ffba8-image.png

    To execute your script, menu to Plugins > Python Script >Scripts > (pick the name of your script)

    563543d8-e217-4dc1-a504-7c7e069c391f-image.png

    And after running that, you will have a file that looks like:
    c78137e3-8a3f-4a77-b936-d8b0bafb0b3a-image.png

    Those screenshots are just a direct translation of the text of Alan’s instructions into the application.

  • how can i Rename word kamal as kamal 1 kamal 2 and kamal 3 ....

    3
    0 Votes
    3 Posts
    227 Views
  • UNABLE TO SORT DATA IN THE ORDER AS IT SHOULD BE BY USING LINE OPERATION

    2
    0 Votes
    2 Posts
    157 Views
    Terry RT

    @saibal-mukherrjee said in UNABLE TO SORT DATA IN THE ORDER AS IT SHOULD BE BY USING LINE OPERATION:

    TWO LINES DATA WHICH MAKES ONE COMPLETE DATA

    No surprise that the built in line sort will not help you. It does the sort assuming each line is 1 datum or record.

    So the choices are:

    Alter the lines so the built in sort will help Wait until someone possibly writes a sort function using python script or some other supported program language, or you learn how to do it.

    Obviously option 1 is the better idea. With this it could be done in 2 ways.

    Add enough of the first line to the start of the second line and then sort. This will keep the lines together, hopefully. Combine the 2 lines together as one line. This would involve adding a special character in between so you know where the original break in lines was. So after combining, sorting, then break at the special character.

    Terry

  • 0 Votes
    11 Posts
    2k Views
    anontestsA

    @Alan-Kilborn said in Please help me! How do you remove a certain character that only comes at the end of a line? Please help me!:

    Very similar solution. The ^ character represents the start of a line. These are very basic principles in regular expressions.
    So Find What:^-

    There’s a caveat with this one.
    Say the line is like this: -------------I'm a line
    Then a regex operation using ^- would affect ALL of the -, not just the first one.
    HERE is another posting discussing an alternative technique to only handle the first character, when multiple of same are involved.

    Oh.
    Well, to be honest, I actually did want to remove all of them from the 1st and last line, and I think I just did ‘‘replace all’’ over and over again until they were all gone. Haha.
    But, yeah, that’s useful for anyone that specifically needs to remove a certain character from the beginning, but wants to keep the same character.
    Thank you!

  • Macro command reference

    4
    0 Votes
    4 Posts
    4k Views
    PeterJonesP

    @alexolog ,

    See the config files: <Macros> section of the npp-user-manual.org site.

  • Submenu Item on Edit Context Menu

    5
    0 Votes
    5 Posts
    866 Views
    PeterJonesP

    @PeterJones said in Submenu Item on Edit Context Menu:

    in the next release

    Which @donho just released a few mintues ago (thanks!). So now my official docs link points to the explanation with more detail.

  • Regex pattern needed

    3
    0 Votes
    3 Posts
    230 Views
    PeterJonesP

    @PeterJones said in Regex pattern needed:

    Or maybe I will find some time this evening.

    Well, it was the next day, but…

    My mistake in yesterday’s modified BSR = <a[^\s>]*> was including \s in the complement character class, which meant it had to be <a...> without any spaces, which obviously cannot match <a href="...">. Once I realized that, it was easy to fix.

    BSR = <a[^>]*> ESR = </a> FR = %20 RR = \x20 (or literal space) FIND = (?-i:<a[^>]*>|(?!\A)\G)(?s:(?!</a>).)*?\K(?-i:%20) REPLACE = \x20 Final Transformation of my previous data:<a href="https://www.server.example/path/something%20with%20spaces">something with spaces</a> <a href="https://www.different.example/path/one%20space">one space</a> <a href="https://www.third.example/path/spaceless">spaceless</a>
  • Delete an entire line if a specific word is found inside that line

    6
    0 Votes
    6 Posts
    30k Views
    AdrianHHHA

    Thank you @Alan-Kilborn for that explanation. I know and use the dot-matches-newline, and yes I should have specified it in my answer.