• Search and replace using named capturing group in regular expression

    7
    1 Votes
    7 Posts
    21k Views
    gerdb42G

    “Search / Replaces in files”-function allows only 1 line.

    Who said so? If you know where line breaks will occur, try \R-Pattern as Placeholder. Or check option . finds \r and \n.

    In replacement, insert \r\n at places where you want line breaks.

    When using . finds \r and \n pay special attention to greedy/non greedy repeats.

  • RTF in NotePadd ++, can I get rid of the url underline??

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    gerdb42G

    Where is the underline shown? If it’s in Notepad++ it has nothing to do with RTF. Go to Settings->Preferences->MISC and disable clickable links.

    If it’s not in NPP, many Tools have similar Settings to automatically highlight text parts that look like a link.

  • Change many lines

    4
    0 Votes
    4 Posts
    3k Views
    Gunar MayerG

    Hello
    I have installed it.
    But I don’t found to change many lines in MANY files — perhaps I did not find it and please give me a hint.
    For example 10000 files in a folder.
    For example I search 3 lines and instead of this lines I need to put in 10 different lines.

    Please help
    Mayer

  • Contents of clipboard being lost

    Locked
    1
    0 Votes
    1 Posts
    9k Views
    No one has replied
  • Redistribution of Notepad++

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • shortcut to Window > Windows...

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Lost unsaved notes

    Locked
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • list functions issue with python

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • run a macro multiple times... Not functioning

    2
    0 Votes
    2 Posts
    3k Views
    Diane GrosshansD

    I have had the same problem. Only one line could be changed at a time.
    I made the end of the line following the last populated field… no trailing spaces.
    Now I run EOF or number of lines and it goes through the entire file, but only the first line is updated properly.

    I am inserting spaces to create a space delimited text file to unload to CSV file.

    Only the first record is converted properly.
    It looks like each subsequent line has a space added in it that is not visible. Wonder if it is related to CR or LF at the end of each line.

  • Tab Order

    5
    0 Votes
    5 Posts
    5k Views
    guy038G

    Hello Carol,

    Just click to my post to ColinsForum, two days ago :

    https://notepad-plus-plus.org/community/topic/11918/arrangement-of-multi-line-tabs-in-alphabetic-order/2

    You can skip the first part, if you don’t care to backup the present order of your tabs :-))

    Enjoy N++,

    Best Regards,

    guy038

  • All appearances in search

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    guy038G

    Hello Radu Vîrşescu,

    Yes, indeed ! Moreover, it will allow me to talk about the main property of a powerful feature of regular expressions : the look-arounds :-))

    A look-around can be, either, a look-behind or a look-ahead and, either, positive or negative. A look-around contains its own regex ( or a string or a character ! ) which must be matched, at cursor location, in order that the regex engine considers that there a reel match of the entire regex, when the main regex is already matched

    An example : let’s suppose the simple subject string abcdefghidefxyz, beginning a line and the regex (def(?=ghi)|.)

    When the position of the regex engine is located before the letters a, b or c, the regex engine chose the second part ( . ), of the alternative |, because it can’t see any string def, at cursor location

    Then, the regex engine matches the string def, because that string is quite followed with the string ghi ( first part of the alternative (def(?=ghi) ). It’s important to note that, although the regex engine needs to look till position 9, to verify that the string ghi is, really, present, the “official” location of the regex engine is, still, just after the string def and before the letter g ( so between columns 6 and 7 )

    Indeed, if you go on searching, you, now, get, successively, the letters g, h, i, then, again, the letters d, e and f and, finally, the letters x, y and z, which are, all, matched, because of the dot ( . ). Note that the second string def, although found by the regex engine, is NOT considered as a match, just because it’s NOT followed by the string ghi !

    So, Radu, you, certainly, have found out how to build your regex, for your counting !!

    Simply, search for the regex a(?=a) Et voilà !

    For instance, given the subject string aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ( 30 letters a ), a click on the Count button returns 29 matches. Quite logical :-)

    Now, if you choose the regex a(?=aaaaaaaaaa), you get, only, 20 matches

    And if you choose the regex aaa(?=aaaaa), you’ll obtain 8 matches ( 8 consecutive groups of the string aaa ), because the ninth and tenth groups of the string aaa are NOT followed by the exact string aaaaa !!

    Best Regards,

    guy038

  • Uncomment block not working ?

    Locked
    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • Alt + Left Click to select specifc text within a column.

    7
    0 Votes
    7 Posts
    9k Views
    Matt BarwickM

    Many thanks for the input @guy038 it is most appreciated.

    Matt

  • Syntax highlight entire line - or to end of line

    Locked
    11
    1 Votes
    11 Posts
    13k Views
    dailD

    how can I switch back to this custom highlighter

    The easiest way is probably just to switch to a file and switch back. The only other way I could think of is possibly tie it to a shortcut key.

    to do code-folding using BRACES or something?

    It technically should be possible since the plugin simply wraps all the API calls for Scintilla, however I’ve never actually messed with code folding at all so I’m not sure what all it would take to do it properly…so most likely I will pass on this.

  • PowerShell parser mixing smart quotes and the normal double quote

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    dailD

    The parsers Notepad++ uses is from Scintilla. Notepad++ is using a bit older version but even in the newer version it looks like the parser for PowerShell would still have this problem. Would probably be best to report this issue to that project.

  • Function list tuning

    13
    0 Votes
    13 Posts
    11k Views
    Joseph CasellaJ

    this is very helpful i’m looking on dev-ing a website for some microsoft guy and he is trying to figure out the proper way for notepad++ for shopping.

  • Context sensitive help

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Jim DaileyJ

    @Randy-Harris Sorry, I am not familiar with the Language Help extension or AutoIt.

    If you are looking for function help, then you can create an XML file that will be used if you enable Function completion in the Settings–>Preferences–>Auto-Completion dialog.

    You can see several examples of the type of XML file in the plugins\APIs directory of your Notepad++ installation.

    You may have to do some other configuration to tie the file type (extension) of your AutoIt files to the XML file, but it may simply be that you have to name the XML file with the same extension of your AutoIt files.

    You can find related on-line help here: http://docs.notepad-plus-plus.org/index.php/Category:Auto_Completion

    Regards,
    Jim

  • Worsened search in files with the encoding win-1251

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Bookmarking Lines Containing Values in Other File

    4
    0 Votes
    4 Posts
    7k Views
    guy038G

    Hello Joe Murphy,

    I’ve got a solution :-))

    So, let’s suppose that you have :

    A huge file, File A, with a lot of records, containing several fields, separated with comma

    A smaller file, File B with some records, having the same organisation. This File B may contain, either :

    Some records identical to those, in File A

    Some fields, numbered n, identical to those, in File A, with the same number n

    Just one hypothesis : Each record must NOT begin with a comma character

    So, two main cases may happen :

    You need to bookmark all the records, of File A, that have a same record in File B

    You need to bookmark all the records, of File A, whose Field n have a corresponding Field n, in a record of File B

    Follow the different steps, below :

    Open, first, your file File B, in Notepad++

    Select all the contents of File B ( CTRL + A )

    Save it, in the clipboard ( CTRL + C )

    Now, open your file File A

    Add, at the end of File A, a new line #####, which will determine the boundary, between the two files File A and File B !

    You must choose any character, NOT present in, both, File A and File B. It may be, either, a @, %, &,… character

    Then append the contents of the clipboard, at the end of File A, after the line ##### ( CTRL + V )

    Go back to very beginning of the present File A ( CTRL + Origin )

    Open the Find dialog ( CTRL + F )

    Select the Mark tab

    Check the Bookmark line option

    Select the Regular expression search mode

    Depending of case 1) or 2) chosen, type in the regex :

    SEARCH : (?-s)^(.+\R)(?=(?s).*#####.*?\1) for case 1)

    SEARCH : ^([^,\r\n]+?,){n-1}\K([^,\r\n]+)(?=(?s).*#####.*?\2) for case 2)

    IMPORTANT : In the second regex, just change the n-1 formula by the appropriate number, depending on number n of the concerned field )

    Click on the Mark All button

    Depending of case 1) or 2) chosen :

    => All the lines, of File A, with an identical line, located downwards, after the line #####, ( from File B ) are bookmarked

    => All the lines, of File A, with an identical Field n, located downwards, after the line #####, ( from File B ) are bookmarked

    Move to line #####

    Delete from that line ##### to the end of the file ( all the appended lines of File B )

    Finally, save, the new state of File A, with all the bookmarks

    Et voilà !

    Notes :

    If some lines/fields are identical in File A, without, at least, one corresponding line/field, in File B, they are NOT bookmarked, due to the ##### boundary !

    If some lines/fields are identical, in File B, it doesn’t matter, as long as there is, at least, one corresponding line/field, in File A, which will be, correctly, bookmarked

    Best Regards,

    guy038

    P.S.. :

    I forgot to tell you about the (?s) and (?-s) modifiers :

    Usually, when the . matches newline option, of the Find dialog is unchecked OR when you use the (?-s) form, any dot, in the regex, stands for a standard character, that is to say any character, part of the class [^\r\n\f]

    However, when the . matches newline option is checked OR when you use the (?s) form, in regexes, the dot stands for absolutely any character ( standard and/or End of Line characters ). For instance, if the cursor is at the very beginning of the current file, the simple regex (?s).* matches any character and is equivalent to a CTRL + A command !!

  • HEX Editor plugin is marked non-stable and is disabled on each update

    6
    0 Votes
    6 Posts
    4k Views
    Bryan BernsB

    I know that if the Notepad settings structure doesn’t exist in the user’s AppData area, the plugin will hang upon launch of Notepad++.