• Function list

    1
    1 Votes
    1 Posts
    248 Views
    No one has replied
  • Save found files?

    26
    0 Votes
    26 Posts
    5k Views
    EkopalypseE

    @Alan-Kilborn

    Not a big burden, only the “print” line for that…

    and the encode is not needed as py2 returns bytes
    as well as the b before the “%p”.

    But…What’s your magic behind f_editor?

    Nothing, this is just my object which represents the editor in the find in files window.
    As you said, what you would have expected must be done on your side.

  • Prefix folding keywords

    2
    0 Votes
    2 Posts
    315 Views
    EkopalypseE

    @Hein-Mulder

    if you use it in folding in code 2 style (separators needed) then it shouldn’t happen.

  • Viewing Find/Search results...

    9
    0 Votes
    9 Posts
    5k Views
    PeterJonesP

    @Vasile-Caraus,

    See my PS in your thread about your issue.

  • How to "show/display the results of what I replaced" ?

    5
    0 Votes
    5 Posts
    848 Views
    PeterJonesP

    In another thread, rather than here, @Vasile-Caraus said in Viewing Find/Search results...:

    you should include this feature (such as a console) in a plugin as NppExec. Because I want to see what exactly did I “Replace”, and if I have to perform an undo before saving.

    If you have a new feature you’d like to request, please see this FAQ for instructions on how to do that.

    PS: If you want more discussion on your issue, please do so in the thread you started, or other active threads. Re-awakening another thread that has been completed for 2.5 years, when the only commonality between that thread and your issue are the words “find/search”, is considered poor forum etiquette (here or in any other forum I’ve been involved in). It’s fine to re-open a thread that’s actually related to the issue you’re having, but in this case, wanting to see a list of all the lines changed by a replace function is a completely different topic than was being discussed in that “Viewing Find/Search results...” thread.

  • Blank sheet is printed on dark background themes

    4
    0 Votes
    4 Posts
    1k Views
    marwinM

    @Alan-Kilborn
    i don’t know why i didn’t found the Print-Settings, shame on me. The setting “Black on white” is the one that works for me.

    Thank You

  • how to show line in hex

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @andrecool-68 ,

    Oh, right, I forgot that the Converter plugin came with the ASCII->HEX command. Since Plugins > Converter comes by default with Notepad++, that’s definitely the best solution.

  • Where do I find the UDL I'm looking for?

    9
    0 Votes
    9 Posts
    2k Views
    PeterJonesP

    No, those are ones distributed with Notepad++ itself. We don’t really want every submitted UDL to be automatically distributed with Notepad++.

  • How do I "replace all" in columnar selection?

    10
    0 Votes
    10 Posts
    2k Views
    guy038G

    Hi, All,

    I even found out a shorter syntax, both in the search and replacement parts !

    So, the generic regex to use would be :

    SEARCH (?-s)(()|^.{Co-1}\K\x20*)(?=Ch)

    REPLACE ?2\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

    As the Ch character is the = sign and should be located at position Co = 23, we get the exact regex syntax :

    SEARCH (?-s)(()|^.{22}\K\x20*)(?==)

    REPLACE ?2\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

    Notes :

    Beware that the empty group 2 (), before the alternation symbol |, is needed !!

    If the 1st alternative is chosen, the regex engine looks for an empty string, only if followed with an = sign

    In replacement, this empty string is replaced with the range of space characters, as group 2 exists

    If the 2nd alternative is chosen, the regex engine looks for a range of space characters, beginning at position 23, but only if followed with an = sign

    In replacement, this non-wanted range of space characters are simply deleted, as group 2 does not exist

    Cheers,

    guy038

  • -1 Votes
    14 Posts
    2k Views
    Vasile CarausV

    @guy038 said in Loop or "batch command" - Search and Replace (especially regex) , in order to run multiple times the operation:

    (?-si)(?<=<p class=“best”>)\K\h*|\G((?!</p>).)*?\K(\h+(?=</p>)|\h\K\h+)

    now, this is the best solution ! Probably, if I didn’t test other cases, it would not have been complete.

    thank you very much @guy038 .

  • Encrypt file with access to run

    8
    0 Votes
    8 Posts
    1k Views
    Metza ErfanM

    Thanks to @Ekopalypse & @PeterJones for your advise
    Actally Tekla can’t read encrypt .ini file, I will try to find another solution.

    Thanks all

  • Running code in a browser

    4
    0 Votes
    4 Posts
    5k Views
    Prahlad-Makwana4145P

    Hello, @Terry-Shaw

    Follow these steps to run code in a browser:

    Step 1:- The run menu by going to the %AppData%\Notepad++ directory.
    Step 2:- Edit the shortcuts.xml file.

    <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>

    That’s what it reads by default.

    <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">%LocalAppData%\Google\Chrome\Application\Chrome.exe &quot;$(FULL_CURRENT_PATH)&quot;</Command>

    That’s what it could read.

    Step 3:- Type this into the run command box:

    %LocalAppData%\Google\Chrome\Application\Chrome.exe "$(FULL_CURRENT_PATH)"

    NOTE :- if you download the latest version (5.7?), the Run menu has four different “Launch in browser” menu item(IE, Firefox, Chrome, and Safari).

    I hope above information will be useful for you.

    Thank you.

  • Something like duplicate in Notepad++

    3
    0 Votes
    3 Posts
    454 Views
    Danico DanicoD

    It works, thanks a lot.

  • Regex - \K pattern alternatives

    5
    0 Votes
    5 Posts
    3k Views
    guy038G

    Hi @vasile-caraus, @peterjones, @alan-kilborn and All,

    First, Alan I apologize because I forgot a part of a sentence, in my previous post ! I said :

    It is said that .NET supports full regular expression syntax. So, you do not need the use of the \K feature ;-))

    But I wanted to say :

    It is said that .NET supports full regular expression syntax within look-behinds. So, you do not need the use of the \K feature ;-))

    Indeed, using the examples of special look-behind constructions, given in :

    https://www.regular-expressions.info/refadv.html

    (?<=is|e)t matches the second and fourth letter t in the string twisty streets. This syntax should work with .NET and does not work with our Boost regex engine. Whereas the similar syntax (?<=is|ee)t, with alternatives of the same length, is correct with Boost !

    (?<=s\w{1,7})t matches only the fourth letter t in the string twisty streets. This syntax should work with .NET and does not work with our Boost regex engine. Whereas the similar syntax (?<=s\w{4})t, , with a fix number of repetitions, is correct with Boost !

    (?<=s\w+)t matches only the fourth letter t in the string twisty streets. This syntax should work with .NET and does not work with our Boost regex engine. Whereas the syntax s\w+\Kt, using the \K feature, is correct with Boost !

    (\w).+(?<=\1), with a back-reference inside the look-behind, matches twisty street in the string twisty streets. This syntax should work with .NET and does not work with our Boost regex engine. Whereas the syntax (\w).+\1, without any look-behind feature, is, of course, correct with Boost !. In the both cases, assuming the implicit (?-s) modifier, it matches the longest zone of standard characters between a same starting and ending word character ! However, note a subtle difference :

    With the .NET syntax, (\w).+(?<=\1), the .+ part matches the string wisty street

    With the Boost syntax, (\w).+\1, the .+ part matches the string wisty stree

    s\Kt, with the \K feature ( “Keep text out of the regex match” ), matches the second and third letter t in the string twisty streets. Seemingly, this syntax is not allowed in .NET regex engine but does work with our Boost regex engine ! Note that this example is trivial because we can use, instead, both with .NET and Boost, the regex (?<=s)t, which uses a simple look-behind structure ;-))

    I hope, Alan, that these additional explanations will shed some light on this matter ;-))

    Best Regards,

    guy038

  • Control symbols now inserted on macro

    27
    0 Votes
    27 Posts
    4k Views
    PeterJonesP

    @Alan-Kilborn said in Control symbols now inserted on macro:

    recordedMacroStep::PlayBack
    … ansiBuffer[4];

    That makes some sense. At first I was wondering what change prompted that to start failing, and the GitHub blame shows those two lines haven’t been changed in 3-4 years. But really, if Scintilla changed the way it’s doing things, maybe the _sParameter.c_str() now has a 4byte char rather than a 3byte char, or something.

    Alternately, MS Docs: WideCharToMultiByte shows that sending cbMultiByte (the 3 or 4 in the last arg before the NULLs) as a 0 will have it return the width needed, so wouldn’t it be more future proof to use:

    int ansiBufferLength = ::WideCharToMultiByte(static_cast<UINT>(pEditView->execute(SCI_GETCODEPAGE)), 0, _sParameter.c_str(), -1, ansiBuffer, 0, NULL, NULL); // grab needed ansiBuffer length ::WideCharToMultiByte(static_cast<UINT>(pEditView->execute(SCI_GETCODEPAGE)), 0, _sParameter.c_str(), -1, ansiBuffer, ansiBufferLength, NULL, NULL);

    (though you’d need to either re-dim ansiBuffer, or make sure it’s always got enough room)

  • Difficulty Selecting Text

    7
    0 Votes
    7 Posts
    1k Views
    EkopalypseE

    @Alan-Kilborn

    Yes, I think this is a mouse pointing thing which, btw., SciTe does as well.
    Not sure how easy it would be for npp to handle this differently and
    yes, I never noticed this as well. :-)

  • 0 Votes
    2 Posts
    456 Views
    andrecool-68A

    @magy-abbas
    Looks like you’re making a fake site ?!

  • Horizontal two finger swipe to move the cursor? (TouchPad)

    3
    0 Votes
    3 Posts
    545 Views
    Hyung-jun ChangH

    @Ekopalypse No I am using generic HP notebook with a built-in ‘precision touchpad.’ And I’m afraid I don’t know if any other Win10 apps have this function. I was just using an iPad and thought it would be cool to have this kind of function in Notepad++ since you know, iPad’s touchscreen and the notebook’s Touchpad works in a very similar way.

  • Where to find help?

    2
    0 Votes
    2 Posts
    255 Views
    EkopalypseE

    @Andreas-Krüger

    sources for the onine documentation is available via github repo.

  • How do I improve the go to next bookmark option?

    7
    0 Votes
    7 Posts
    762 Views
    andrecool-68A

    @Alan-Kilborn
    After moving to the next bookmark, you need to click on the down arrow, and then everything turns out as I need.
    It’s a pity that it’s not possible to write all this into a macro, the macro does not see the operation with the plugin))