• Removing variable text

    Locked
    1
    0 Votes
    1 Posts
    986 Views
    No one has replied
  • Issue opening directory in FTP

    Locked
    2
    1 Votes
    2 Posts
    2k Views
    Lucas LomanL

    Also, after several minutes, I receive the message:
    “Failure retrieving contents of directory /”

  • Pc won't boot.

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Read-only does *NOT* work.

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    Claudia FrankC

    @Martin-Bedan

    removing the read-only flag doesn’t change the content of a file but
    of course makes a process able to do changes again so it might be that
    some queued changes do get flushed as soon as the process determines that it can
    write to the file. But this is not the behavior of npp.

    Cheers
    Claudia

  • Hello, again. Back a little quicker then expected lol

    Locked
    1
    0 Votes
    1 Posts
    947 Views
    No one has replied
  • How find range of lines by their number?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Scott SumnerS

    @Obada-Kurdi

    Okay, so technically it isn’t possible to directly say “Replace lines X through Y” with something else. That being said, there are some ways to achieve the goal.

    In your specific case, with X=1 and Y=189, it becomes fairly easy:

    Step 1: Move your caret to the very top of your file (important)

    Step 2: Execute the following “Replace” operation (not “Replace All”!):

    Find-what: (?-s)(.*\R){189} Replace-with: whatever you want Search-mode: Regular expression

    However, in the general case (where the starting line X is NOT equal to 1), things are more interesting/tricky. Here’s a solution for that general case, unfortunately it requires you to do some mental math:

    Step 1: Move your caret to the very top of your file (important)

    Step 2: Execute the following “Replace” operation (not “Replace All”!):

    Find-what: (?-s)(.*\R){S}\K(.*\R){L} Replace-with: whatever you want Search-mode: Regular expression

    where:

    S is the one less than the desired starting line number, note S = X - 1 L is the number of lines it is desired to replace, note L = Y - X + 1

    because (from the problem statement):

    X is the FIRST line to replace with other data Y is the LAST line to replace with other data

    This technically isn’t a Notepad++ question, but more of a Boost regular expression engine question, so I’m reluctant to put forward this solution here, due to less tolerance lately for non-Notepad++ discussion. However, this does have an important N++ implication regarding where the caret is when the replacement is conducted.

    If this (or ANY posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

  • application error

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Мария-Денисова

    does this happen when you use no plugins also? You can start npp with -noPlugin switch
    or by renaming plugins directory temporarily.

    Cheers
    Claudia

  • Quick question if someone has a free sec...

    15
    1 Votes
    15 Posts
    18k Views
    ImNot GlennDanzigI

    Wow…you guys are awesome!! Sorry for the late reply. Been trying to find a host for my sites. The world is literally insane btw. Lol. Anyway thanks everyone for the help. I knew there had to be away. You guys are all amazing. I was a little hesitant to ask this question knowing what a wanted to do wasn’t a normal Notepad task. You all were very kind and kept on point and i appreciate that as well. I know I’ll be back if even if it’s just to drop by and roam (lurk) around. Lol. Take care everyone and until next time ^^GoDsPeEd^^

  • List to line

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    Stuart LevesqueS

    Thank you very much!!!

  • Closing multiple tabs, confirmation dialog position

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    Scott SumnerS

    @Mykhailo-Konvisar

    I see what you mean about the buttons moving around, via the dialog box changing size as the file pathname greatly changes in length from file to file. I haven’t looked at the source code, but it is probably done with a standard Windows YES-NO-CANCEL MessageBox call, in which case I totally understand this behavior.

    I’m not sure how much you prefer mouse versus keyboard, but as a workaround, how about just pressing the N (or Y, in case you need that…) key when that dialog box appears? (Alt+N or Alt+Y also work, but that just seems like unnecessary extra effort.)

    I totally understand if you know about the keyboard possibility and are just making a feature request. However, the right people either won’t see it here, and/or aren’t going to track it here.

    Your best option is to make a feature request or a change-in-functionality request here. Please spend a little time searching to see if your specific request already exists (in which case you can “up-vote” that request, and/or add any new information you think relevant).

    If this (or ANY other posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

  • 0 Votes
    3 Posts
    2k Views
    Alex Levente AndrejszkiA

    Hi Scott,

    Your solution dosen’t work on my PC unfortunately.
    But the version of Notepad++ doesn’t matter. How I want to select Notepad++ 5.6.8 can carry out.

    Thanks for you answer :)

    Alex

  • 0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @D-F

    has been already addressed here.

    Cheers
    Claudia

  • Does it possible to make UDL code folding without closing keyword?

    Locked
    1
    0 Votes
    1 Posts
    893 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    Marco FabbriM

    Just as a reference…
    The quickest workaround I found is to use a cygwin shell with “pcre” package installed…
    $ pcregrep -M “BGP neighbor is.\r\n.\r\n.\r\n.\r\n.*\r\n.*state.*Established.*3w” file.txt

    (the above example look for a 6 lines string block such as:

    BGP neighbor is xxxx
    Remote AS xx, local AS xx, internal link
    Description: xxxx
    Remote router ID xxxx
    Cluster ID xxxx
    BGP **state **= Established, up for 3w5d

    hope this helps.

  • Caffe prototxt file edition using notepad++

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    9 Posts
    5k Views
    Grace BenG

    Informative blog with good useful information.

  • Help removing folder margin style lines.

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    Claudia FrankC

    @Saksham-Gupta

    I’m not aware of any plugin which supports c++ script execution.
    So you either have to write your own little plugin which executes
    SCI_SETFOLDFLAGS(0) when it receives the NPP_READY notification
    or you install one of the mentioned plugins and call the respective function.

    Cheers
    Claudia

  • Plugin / Regex in Meniu Bar / My Favorite - Add new keep

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Vasile-Caraus

    You don’t say if you are wanting to do searches or searches+replaces, but either way you could record and save a macro (and then it would appear in the “Macro” menu).

    The downside to this is that then the regular expressions used become very “hardcoded” – there is no existing easy way to create a situation where, for example, a regular expression(s) linked to a named menu entry could pull up the Find dialog, populate the find-what and/or replace-with boxes, and then let you edit them slightly before running the search. At least this doesn’t exist as far as I’m aware…perhaps a plugin? “RegRexPlace” (not updated since 2009) seems to be a start on this idea, but it is very basic and the author even says it needs improvement.

    My favorite editor of old, MultiEdit, allowed creating and saving regular expression search data under custom names, and even had a prompting feature such that, when run, it would ask the user for some input data, and then produce a very specific search field. Something like (not remembering exact syntax very well):

    <prompt “Enter a number”=my_number>this regex looks for the number `my_number`

    So then when that named search is run, a prompt box pops up asking “Enter a number” and the user enters data (for example, 123); then the search will be run looking for the exact data this regex looks for the number 123

    Okay, so that example doesn’t show the power of the feature, but the basic idea is there I guess. :-)

    This probably goes above and beyond what the OP is asking about, but I just thought I would throw it out there…

  • help replacing places

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Eris-Leci

    from your given example you can use regular expression, build 3 matching groups and rearrange it like this

    find what:(\d+)(:)(.+@.+\.com) replace with:$3$2$1

    Means it is search for any number of digits (\d+), at least one followed by a colon (:) followed
    by any char followed by @ followed by any char followed by .com

    If you want to learn more about regular expression see this link and the last post by guy038
    https://notepad-plus-plus.org/community/topic/14208/is-regex-condition-possible-in-replace-string/5

    Cheers
    Claudia

  • .txt not added to text files

    5
    2 Votes
    5 Posts
    4k Views
    Claudia FrankC

    @Bret-Leduc

    Maybe the setting
    Settings->Preferences->Default Directory->Use new style save dialog… was activated?

    Cheers
    Claudia