• Marking links for deletion

    2
    0 Votes
    2 Posts
    181 Views
    Alan KilbornA

    @Henk-ter-Heide said in Marking links for deletion:

    When I double click a link it gets opened in my browser and when I triple-click it, it gets marked and I can delete it.

    Triple-clicking selects the entire current line, including the line-ending, so your link must occupy the entire line for this to work. In general, though, it is not true that triple-clicking selects a link.

    Also, my experience is that the double-click logic also fires, so yes you will get your link opened in a browser before it is selected.

    However, I can’t replicate your other experiences, at least with Notepad++ 7.9.1.

  • I want to make a calculator but I like don't know anything

    5
    0 Votes
    5 Posts
    394 Views
    PeterJonesP

    @flamemaster46 ,

    Given your user name (“flamemaster” implies you like giving and/or receiving insults) and the posts you’ve made so far, I am guessing you are here to troll us.

    On the off chance you aren’t, and you’re really in need of this level of basics: Notepad++ is a text editor. You can use any text editor you want for programming in C++. We think that the features of Notepad++ like syntax highlighting and the available plugins make it a useful tool for entering the source code for C++ and many (any) other programming languages. However, this forum is not a generic programming forum; we aren’t here to answer any random programming questions you have – and we definitely aren’t here to help you go the “shortcut way” of learning c++, or telling you what you can program in c++. Just about any application you can think of, there’s probably a way to do it in c++; and as far as I know, any c++ code you can write, you can use Notepad++ as the text editor to write the code in. But Notepad++ is not a c++ compiler; it is a text editor – you have to have an external compiler in order to compile your c++ code into an executable.

    If you were interested in seeing how to run your compiler from inside Notepad++, I give examples elsewhere in the forum of how to use the NppExec plugin to run external compilers (just do an advanced search for “NppExec” and my user name).

    But if you’re just here to get or give insults, or otherwise troll us, please don’t bother; that’s not why we’re here.

  • Highlight non-breaking spaces

    2
    0 Votes
    2 Posts
    294 Views
    Alan KilbornA

    @Myvh

    There’s info HERE on that, and HERE also.
    Note that you may have to read down a bit into those threads, where more of what you are interested in occurs.

    Definitely doable, with a bit of effort.

  • Help support Perl6/raku language

    2
    0 Votes
    2 Posts
    286 Views
    EkopalypseE

    @abelfourier
    you can check here if there is already an UDL available
    or here on how to create one.

  • 0 Votes
    2 Posts
    203 Views
    EkopalypseE

    @Vyrre

    no, these settings change npp internal behavior for
    functions like find dialog etc…, these are not intended for
    building/simulating an IDE.
    I would recommend to use the excellent NppExec plugin
    which allows you to create different profiles to run different commands.

  • Function List and PL/SQL packages

    29
    0 Votes
    29 Posts
    31k Views
    Marco GonzalezM

    Hi guys, after a few little changes it seems to work now for all my Plsql files…
    <?xml version=“1.0” encoding=“UTF-8” ?>
    <!-- ==========================================================================\

    To learn how to make your own language parser, please check the following link: https://npp-user-manual.org/docs/function-list/

    |
    =========================================================================== -->
    <NotepadPlus>
    <functionList>
    <!-- ========================================================= [ PL/SQL ] -->
    <parser
    displayName=“SQL-mehods”
    id =“sql_syntax”
    commentExpr=“(?x) # Utilize inline comments (see RegEx - Pattern Modifiers)
    (?s:\x2F\x2A.?\x2A\x2F) # Multi Line Comment
    | (?m-s:-{2}.$) # Single Line Comment
    " >
    <classRange
    mainExpr =”(?x) # Utilize inline comments (see RegEx - Pattern Modifiers)
    (?mi) # case insensitive
    ^\h* # optional leading blanks
    (CREATE\s+(?:OR\s+REPLACE\s+)?)?PACKAGE\s+(?:BODY\s+)? # start-of-package indicator
    (?:\w+.)? # schema name, optional
    (?‘PACKAGE_ID’\w+) # package name
    (?s:.?) # whatever, until…
    ^\hEND(?:\s+\k’PACKAGE_ID’)\s*; # …end-of-package indicator
    " >
    <className><nameExpr expr=“(?i:PACKAGE\s+(?:BODY\s+)?)\K(?:\w+.)?\w+” /></className>
    <function mainExpr=“^\h*(?i:FUNCTION|PROCEDURE)\s+\K\w+\s*(([^()]))?“>
    <functionName><funcNameExpr expr=”\w+" /></functionName>
    </function>
    </classRange>
    <function mainExpr="^\h(CREATE\s+(?:OR\s+REPLACE\s+)?)?(?i:FUNCTION|PROCEDURE)\s+\K\w+\s*(([^()]*))?” >
    <functionName><nameExpr expr=“\w+” /></functionName>
    </function>
    </parser>
    </functionList>
    </NotepadPlus>

    I also indented it my own way, sorry for that, enjoy it!

  • How to unescape?

    14
    1 Votes
    14 Posts
    14k Views
    guy038G

    Hi, @gioacchino-piazzolla, @alan-kilborn and All,

    I agree that I could have written the first regex S/R to Escape these special characters as :

    SEARCH (\a)|(\x08)|(\f)|(\n)|(\r)|(\t)|(")|(')|(\\)

    REPLACE \\(?1a)(?2x08)(?3f)(?4n)(?5r)(?6t)(?7")(?8')(?9\\)

    But , in that case, any text is changed in a one-line text. Just give it a try with the change.log or license.txt file ! Don’t know if this syntax is expected by the OP ?

    Now, I added the single quote character as I remember that the TextFX plugin can escape/unescape the ' character !

    BR

    guy038

  • select lines with specific number of word it it

    9
    0 Votes
    9 Posts
    825 Views
    guy038G

    Hello @dimitrov, @alan-kilborn, @peterjones, @astrosofista and All,

    Two days later, I realize that my generic regex could be shortened a bit ! Reading, again, what I said in my previous post :

    Part WITHOUT Hi (Part WITHOUT Hi + Hi) x 4 Part WITHOUT Hi ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | | | | V V V V (?x-s) ^ ( (?! Hi ).)* ( ((?!Hi).)*? Hi ){4} ((?!Hi).)* $ # The INITIAL regex

    You may see, as I did, that the regex begins with “Part WITHOUT Hi” and ( “Part WITHOUT Hi” and “Hi” ) repeated four times. So, there is a redundant part in this expression !

    The initial regex should be, simply :

    ^ (Part WITHOUT Hi + Hi) x 4 + Part WITHOUT Hi $ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | | | V V V (?x-s) ^ ( ((?!Hi).)*? Hi ){4} ((?!Hi).)* $ # The INITIAL regex

    Thus, the four generic regexes to solve general cases are simplified :

    To match lines containing your string, whatever the case, as a whole expression, the number of times, within the range :

    (?i-s)^(?:((?:(?!(\bYour string\b)).)*?)(?2)){Your range}(?1)$

    To match lines containing your string, whatever the case, the number of times, within the range :

    (?i-s)^(?:((?:(?!(Your string)).)*?)(?2)){Your range}(?1)$

    To match lines containing your string, with its exact case, as a whole expression, the number of times, within the range :

    (?-is)^(?:((?:(?!(\bYour string\b)).)*?)(?2)){Your range}(?1)$

    To match lines containing your string, with its exact case, the number of times, within the range :

    (?-is)^(?:((?:(?!(Your string)).)*?)(?2)){Your range}(?1)$

    For instance, all the regexes, below, are valid :

    (?i-s)^(?:((?:(?!(\bHi\b)).)*?)(?2)){4}(?1)$

    (?i-s)^(?:((?:(?!(Hi)).)*?)(?2)){3,5}(?1)$

    (?i-s)^(?:((?:(?!(\bThis is a test\b)).)*?)(?2)){2,4}(?1)$

    (?-is)^(?:((?:(?!(\bThis is a test\b)).)*?)(?2)){2,4}(?1)$

    Just test them against this text below, pasted in a new tab : :

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---Hi----- ---Hi----Hi---- ---Hi----Hi-----Hi---- ---Hi----Hi-----Hi----Hi---- ---Hi----Hi-----Hi----Hi----Hi---- ---Hi----Hi-----Hi----Hi----Hi----Hi----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---This is a test----- ---This is a test----This is a test---- ---This is a test----This is a test-----This is a test---- ---This is a test----This is a test-----This is a test----This is a test---- ---This is a TEST----This is a TEST-----This is a TEST----This is a TEST---- ---This is a test----This is a test-----This is a test----This is a test----This is a test---- ---This is a test----This is a test-----This is a test----This is a test----This is a test----This is a test-----

    Below, a list of the different steps in the genesis of the generic regex which should help you to understand this tricky regex !

    ^ ( Part WITHOUT Hi + Hi) x 4 + Part WITHOUT Hi $ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | | | V V V (?x-s) ^ ( ( (?! Hi ).)*? Hi ){4} ( (?!Hi).)* $ # The INITIAL regex (?x-s) ^ (?: (?: (?! Hi ).)*? Hi ){4} (?: (?!Hi).)*? $ # We change all GROUPS as NON-CAPTURING, add a LAZY quantifier and notice 2 IDENTICAL blocks ! ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Gr1 V (?x-s) ^ (?: ( (?: (?! Hi ).)*? ) Hi ){4} (?: (?!Hi).)*? $ # We create a NEW group 1 AROUND the FIRST block –– –– Gr1 V (?x-s) ^ (?: ( (?: (?! Hi ).)*? ) Hi ){4} (?1) $ # We replace the 2nd BLOCK by a SUB-ROUTINE CALL to GROUP 1 (?1) ¯¯ ¯¯ Gr1 Gr2 V V (?x-s) ^ (?: ( (?: (?! (Hi) ).)*? ) Hi ){4} (?1) $ # We create a NEW group 2 AROUND the FIRST string "Hi" Gr1 Gr2 V V (?x-s) ^ (?: ( (?: (?! (Hi) ).)*? ) (?2) ){4} (?1) $ # We replace THE 2nd string "Hi" by a SUB-ROUTINE CALL to GROUP 2 (?2) (?-s)^(?:((?:(?!(Hi)).)*?)(?2)){4}(?1)$ # We suppress the FREE-SPACING mode and DELETE any SPACE character (?i-s)^(?:((?:(?!(Hi)).)*?)(?2)){4}(?1)$ # We add the CASE modifier (?i-s)^(?:((?:(?!(\bHi\b)).)*?)(?2)){4}(?1)$ # We add the \b BOUNDARIES to get a WHOLE expression ^ | For the 3 LAST regexes, STOP the SELECTION at the $ sign

    You may test any of these regexes above, against the text below, pasted in a new tab. It matches only the line containing exactly four strings Hi !

    ---Hi----- ---Hi----Hi---- ---Hi----Hi-----Hi---- ---Hi----Hi-----Hi----Hi---- ---Hi----Hi-----Hi----Hi----Hi---- ---Hi----Hi-----Hi----Hi----Hi----Hi-----

    Best regards,

    guy038

  • paragraph line break

    33
    0 Votes
    33 Posts
    6k Views
    PeterJonesP

    @kracovwolf said in paragraph line break:

    do you know if the macros are stored in notepads settings

    This and other such questions are answered in the npp-user-manual.org website, which is linked inside Notepad++ as the ? menu’s Notepad++ Online Document entry.

    The location of config files is described in https://npp-user-manual.org/docs/config-files/ The macros section of shortcuts.xml is described at https://npp-user-manual.org/docs/config-files/#macros The overview of macros is found at https://npp-user-manual.org/docs/macros/
  • Setting a user file extension is not working

    7
    0 Votes
    7 Posts
    537 Views
    PeterJonesP

    @Alan-Kilborn said in Setting a user file extension is not working:

    is it possible

    Yes. Either put it as a UDL extension, or remove it from langs.xml

  • CMD.bat script - Error REG DELETE statement

    3
    0 Votes
    3 Posts
    382 Views
    BigstarblueB

    @dinkumoil

    I thank you for the interest you had in helping me. I really appreciate your help.

    You were absolutely right. The problem was with the 32-bit version of N++ I was using. I changed it to 64-bit and it worked perfectly.

    Explanation more than simple and clear !!!

    Thank you again,

    Bigstarblue

  • Find value in line and delete that line and previous line?

    5
    1 Votes
    5 Posts
    276 Views
    Phat LixP

    @PeterJones

    Oh geez! That is a fantastic collection. Thank you.

  • how Find the specific IP in the IP list in notpad++

    8
    0 Votes
    8 Posts
    2k Views
    guy038G

    Hi, @alan-kilborn and All,

    I’m totally agree with you. The legal syntax is, indeed, the special conditional syntax ((?(DEFINE)...........). Just think about the word DEFINE, in upper case !

    Then, an alternative syntax could be, of course, (............)(*F). Indeed, in manuals, the DEFINE part is described as a part of regex which does never match anything, by principle !

    Finally, my syntax ( the third one ), although correct, should be considered as a user’s work-around !

    Cheers,

    guy038

  • How to understand the functionlist parameters

    26
    0 Votes
    26 Posts
    3k Views
    guy038G

    Hello @BGM-coder,

    Could you confirm me that the regexes should act as below :

    Case A ^[[]]: => Unchanged Case B ^[[aaaaa]]: => Unchanged Case C [[bbbbb]] not followed by (ccccc) => Unchanged Case D (eeeee) preceded by [[ddddd]] => Unchanged Case E ^[]: => Unchanged Case F [fffff] not followed by (gggggg) => [-fffff] Case G (iiiii) preceded by [hhhhh] => (-iiiii) Case H ^[jjjjj]: => [-jjjjj]:

    Note that, when cases F or G occur, the respective passage fffff or iiiii may be defined or not

    See you later,

    Cheers,

    guy038

  • How can I write pug js codes in this editor?

    4
    0 Votes
    4 Posts
    908 Views
    PeterJonesP

    @Emo-Ser ,

    It appears you want syntax highlighting. I already gave you links to learn how to create a UDL for pug js, which will add syntax highlighting.

    If, instead, you want to extend the HTML lexer, so that the pug js code is in a different color than any of the normal HTML tags, then you can add extra highlighting to a builtin lexer (like the HTML lexer) using regexes via the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo

    If I have not answered your question sufficiently, then maybe you can try asking more specific questions, and someone else can try to interpret your desires and give a better answer, because I don’t know what more I can say.

    Good luck.

  • Styling &#39;

    6
    0 Votes
    6 Posts
    334 Views
    BGM CoderB

    Oh - thanks, Peter, for your time and for looking at it for me!

  • Regex - find string and between parenthesis values

    11
    0 Votes
    11 Posts
    1k Views
    Terry RT

    @Anthony-Noriega said in Regex - find string and between parenthesis values:

    I’m trying. Regex ain’t easy to learn

    Just as a suggestion. Break down your problem into smaller steps. You are looking for some text on a line, and then that line needs to return something else on the line. So we have 2 steps. The first is to identify a particular line. So that would suggest using the “bookmark” function. You could easily do that, then perhaps copy bookmarked lines elsewhere (another tab). Then you could erase all characters up until the first “(”. Then erase everything after the “)” bracket. These 3 steps are all very easy to achieve with regex. Indeed, they are in reality some of the first steps you would take in learning regex.

    If you come to us you will likely get a 1 step complete solution, and unfortunately you will find that difficult to understand and that will likely not be helpful in you learning regex.

    I always say that you have to get a good foundation in regex before attempting complicated problems, and that may also involve breaking down the problem into smaller steps so that each can possibly become a simple problem.

    And while learning, if you do have a problem that you can’t overcome we WILL help if you can provide evidence of what you have tried, even if it failed. At least we can see some intent on your behalf.

    Terry

  • 0 Votes
    3 Posts
    167 Views
    Ali HussainA

    Thank you much!

  • I need to line up the lines of text from two files in a certain sequence.

    3
    0 Votes
    3 Posts
    168 Views
    astrosofistaA

    Hi @BlackLone-Wolf

    Take a look at this thread, where you will find different ways to deal with this issue.

    Have fun!

  • 1 Votes
    3 Posts
    602 Views
    SaiapatsuS

    Notepad++ not automatically opening a tab for every file in its Backup folder.

    The Backup folder sometimes has files that don’t correspond to any open tabs. So the Backup folder is not where the session is kept!

    What you need is the actual session file. It is exported with File>Save Session..., and physically located at %AppData%\Notepad++\session.xml.
    Edit: to easily get to this file, open any folder, and in the address bar at the top, paste in %AppData%\Notepad++. Or open that link with Run.

    To get Notepad++ to use the session, this exact file needs to be synced. If OneDrive can’t do that, then you may have to symlink this file (or entire folder, even) with a place where OneDrive can put it.

    You can learn how to symlink elsewhere on the internet; it essentially makes a shortcut, except fully live and not just a file that Windows Explorer can follow to open something else.