• Plugin Request: Markdown navigation panel

    2
    0 Votes
    2 Posts
    1k Views
    Michael VincentM

    N++ “has” that. It’s built-in and called the “Function List” (View => Function List). Of course, you’ll need to do a little work to get it to “work”.

    Discussion
    Solution

    Summary below:
    In your functionList.xml in the N++ install directory, in the “<associationMap>” section at the top, add:

    <association id="markdown" userDefinedLangName="Markdown"/> <association id="markdown" ext=".md"/>

    And then at the bottom, in the <parsers> section, add:

    <!-- ==================================================== [ Markdown ] --> <parser displayName="Markdown" id ="markdown" commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?ms: # Code block ^ # ...at start-of-line a (?'BLOCK'\x7E{3}(?!\x7E)|\x60{3}(?!\x60)) # block-start indicator \w*\h*$ # .*? # ...whatever, ^\x20{0,3} # ...optional indentation for a \k'BLOCK' # block-end indicator \h*$ # with trailing white-space only ) " > <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m-s) # ^ and $ match at line-breaks, dot does not ^ # at start-of-line (?'NOCODE_INDENT' \x20{0,3}(?!\x20) # indent of 3 spaces max, otherwise it's code ) (?: # ATX-style heading (?'LEVEL'\x23{1,6}(?!\x23)) # nr. of hashes indicate level \h* # whitespace? ( use '+' instead of '*' for at least one white-space) \K # discard text matched so far (?: [^\r\n\x5C] | \x5C. # backslash escape sequence )+ (?: # closing sequence \h+ # ...starts w/ at least one white-space \x23+ # ...contains only hashes, amount arbitrary )? # ...is optional \h*$ # trailing white-space up till line-break | # Setext-style heading \K # discard text matched so far [^\r\n]+ # whatever, (?= # ...up till \h*(?:\r?\n|\n?\r) # ...any trailing white-space and a line-break, (?&amp;NOCODE_INDENT) # ...indent for header indicator (?:={3,}|-{3,}) # ...H1- or H2-header indicator resp., \h*$ # ...trailing white-space up till line-break ) ) " > <functionName> <nameExpr expr="(?x) (?| (?:\h+\x23+\h*$) [^\r\n]+ (?= \h+\x23 ) | .* ) " /> </functionName> </function> </parser>

    Cheers.

  • multiple txt to one new txt

    24
    0 Votes
    24 Posts
    3k Views
    pinuzzu99P

    thanks you so much, again! cheers

  • 1 Votes
    3 Posts
    355 Views
    Peter StambaughP

    I usually start working by right-clicking on a file in explorer and choosing to open with notepad++. Regardless though, I tested your suggestion, and it did not change things. Yes I got back the same files I
    opened after I closed/re-started Notepad++ with last remember current session enabled, but that didn’t really change anything in terms of default/current file location. The first save went to my documents folder, but subsequent ones went right back to system32. Likewise with opening files, which always defaulted to the Notpead++program directory.

    Either way, I still believe that Notepad++ should be able to remember my last directory between sessions whether or not the remember last session option is turned on. First because since they are separate options in separate areas of the preferences. Second, because that is the standard usage in most every windows app.

    Likewise, I still think the specific directory option should be a default for start of the session only, not for all saves. Within a session the saves and opens should default to the last used directory. At least optionally.

    BTW, In case it matters I am using the 64-bit version, and just updated to 7.8.3 before testing the suggested solution.

  • 0 Votes
    6 Posts
    2k Views
    Tư Mã Tần QuảngT

    @dinkumoil

    Thank alot!

  • Remember file type

    4
    0 Votes
    4 Posts
    308 Views
    Alan KilbornA

    @Shane-Goodman said in Remember file type:

    The asterisks in my original post seems to have changed some words to italic. This forum is a bit buggy.

    No, putting something inside a pair of asterisks means to italicize everything between. You seem to understand that in your second posting, where you italicized the word option. :-)

    …have the option to remember my setting. Productivity is important for me.

    That makes sense…but Notepad++ can’t do it in its current form. The proper method for asking for a feature is described here if you choose to pursue it.

  • Trouble saving files with .js extension:

    5
    0 Votes
    5 Posts
    2k Views
    Terrell MillerT

    thank you very much. I’ll probably take the lazy way out. But this is a relief that the new save procedure is a feature that changed that I did not pick up on.

  • It would be great to have multithreading search in files.

    2
    0 Votes
    2 Posts
    251 Views
    Alan KilbornA

    @Andrei-Iliushin

    Notepad++ doesn’t try to be a great searcher. Yes it provides some functionality, but if you really want advanced functionality, you should turn to other tools. Not the answer you wanted, I’m sure.

  • Setup for without msi or exe

    5
    0 Votes
    5 Posts
    686 Views
    PeterJonesP

    And even with accurate info, you are going to have to tell us more about your situation, because, as I said, there is no performance difference between installed and unzipped versions.

    Questions to think about: is Notepad++.exe on same drive as word.exe? Do you have a file in your MRU list in Notepad++ that is on a network drive, or a separate HDD/SSD? Does your admin have a process watcher that is scanning or throttling unapproved apps? Etc

  • Change Upper to Lower Case only at the beginning of each line

    6
    0 Votes
    6 Posts
    2k Views
    Alan KilbornA

    I suppose the much simpler search for (?-s)^. and replace with \L$0 also works fine…

  • a string to search containing “the new line

    1
    0 Votes
    1 Posts
    161 Views
    No one has replied
  • Single click to select documents in workspace

    3
    0 Votes
    3 Posts
    768 Views
    andrecool-68A

    @Niente0000
    You can add an option to the context menu, but when adding “Folder as workspace”, notepad ++ should be closed.
    Look at this link, maybe this will help you:
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/7741#issuecomment-569251698

  • Automatically add extra lines when comparing

    2
    0 Votes
    2 Posts
    543 Views
    EkopalypseE

    Not sure I understand what you are trying to say.
    Anyway, if this is a feature request about compare plugin
    then you might open an issue here.
    If it is a question about compare plugin,
    then you might need to explain it in more detail.

  • -1 Votes
    2 Posts
    256 Views
    PeterJonesP

    I know that you know, but for others reading this thread, @Hans-van-Gelderen already figured out where to make the feature request, and posted the issue number in the other thread about this topic.

  • Why there is only Clear Read-Only Flag option?

    11
    0 Votes
    11 Posts
    855 Views
    Uzivatel919U

    It is customary, if you start a discussion here, and then turn it into a real issue on github, that you return here and …

    Ok. 👌🏻

  • Judshjrfhsje KLosdeseaswaw

    1
    -2 Votes
    1 Posts
    138 Views
    No one has replied
  • Modernizr in MVC Application

    2
    0 Votes
    2 Posts
    211 Views
  • How can i prevent NPP to add any text by itself in the search string ?

    Locked
    6
    0 Votes
    6 Posts
    4k Views
    donhoD

    Done in commit Make filling find field of Find dialog with selected word(s) optional:
    https://github.com/notepad-plus-plus/notepad-plus-plus/commit/7a1096de5b3618bc3e6611e6c25caac952d41ae2

    It will come with v7.8.3

  • flagging starting and ending parens in batch files

    6
    0 Votes
    6 Posts
    445 Views
    guy038G

    Hello @dshuman52, @alan-kilborn and All,

    @dshuman52, Here is a method which could help you ! It works whatever the current language as it’s a recursive regular expression looking for well-balanced ( .... ) blocks, containing possible juxtaposed / nested other ( .... ) blocks !

    SEARCH \((?:[^()]++|(?0))*\) ( Select the Regular expression search mode )

    Notes :

    From current location of the caret, this regex selects, automatically, the next longest well balanced ( .... ) block

    If you prefer to get the ending parenthesis, only, simply change this regex as below :

    SEARCH \((?:[^()]++|(?0))*\K\)

    To explain this regex, the best is to use the free-spacing mode, which allows comments in regexes :

    (?x) # FREE-SPACING mode \( # STARTING parenthesis (?: # Start of the NON-CAPTURING group [^()]++ # Any NON-NULL ATOMIC range of ALLOWED characters | # OR (?0) # A RECURSION, using the WHOLE regex pattern ( group #0 ) )* # End of the NON-CAPTURING group, repeated 0 or MORE times # \K # DELETE the initial '#' character, of that line, to match the ENDING parenthesis, ONLY \) # ENDING parenthesis

    Try this regex against your text, below :

    @ECHO ON REM LINKdir.bat REM REM %1 = A99LINK REM %2 = A99TARGET REM %3 = A99FILTER REM SET A99LINK=%~1 SET A99TARGET=%~2 SET A99FILTER=%~3 REM REM make directories and link files REM PUSHD %A99TARGET:~0,-1% REM REM make directories FOR %%F IN (DIR /ad /b) DO ( SET %A99FILE%=%%F IF %A99FILE:~0,1%!='.' ( MKDIR %A99LINK%%A99FILE% %A01TESTbatPATH%LINKdir.bat ^ %A99LINK%%A99FILE% ^ %A99TARGET%%A99FILE% ) ) REM REM link files REM FOR %%T IN (%A99FILTER%) DO ( FOR %%F IN (DIR /a-d /b *.%%T) DO ( SET %A99FILE%=%%F IF %A99FILE:~0,1%!='.' ( MKLINK /h %A99LINK%%A99FILE% ^ %A99TARGET%%A99FILE% ) ) ) POPD

    Notes :

    Place the caret at different locations, of this batch file

    Then do the search hitting, several times, the F3 shortcut

    Important :

    Each time that a well-balanced ( .... ) block is selected :

    An hit on the Left Arrow key moves the caret right before the ( starting parenthesis

    An hit on the Right Arrow key moves the caret right after the ) ending parenthesis

    The nice thing is that, when you hit the shift + F3 shortcut, it gets the inner ( ... ) block, closed to the end of the outer ( ... ) block !

    Try also, with your first sample text :

    DO %%F IN (z y x) DO ( IF %%F==x ( ECHO ‘x’ ) ELSE ( IF %%F==y ( ECHO ^ ‘y’ ) ELSE ( IF %%F==z ( ECHO ‘z’ ) ) ) )

    Best Regards,

    guy038

    P.S. :

    In batch files , the & ampersand, the | vertical line and the ( and ) parentheses are special chars. So, they must be preceded with the escape character ^ or embedded inside double quotes.

    Thus, here’s a more elaborate version, where we suppose that the ^ symbol is the default escape character and any character, preceded with a ^ symbol, is just considered as a literal chars, including the syntaxes ^( and ^) !

    (?x) # FREE-SPACING mode (?<!\\) # NEXT character is NOT PRECEDED with a '\' symbol ( LOOK-BEHIND condition ) \( # STARTING parenthesis (?: # Start of the 1st NON-CAPTURING group (?: # Start of the 2nd NON-CAPTURING group \^ [()] # STRINGS '^(' or '^)' are supposed to be ALLOWED characters | # OR [^()] # Any ALLOWED character, even EOL ones, DIFFERENT of the PARENTHESES '(' and ')' )++ # End of the 2nd NON-CAPTURING group ( NON-NULL ATOMIC range of ALLOWED characters ) | # OR (?0) # A RECURSION, using the WHOLE regex pattern ( group #0 ) )* # End of the 1st NON-CAPTURING group, repeated 0 or MORE times (?<!\\) # NEXT character is NOT PREDECED with a '\' symbol ( LOOK-BEHIND condition ) \) # ENDING parenthesis

    Here is its shortest syntax :

    SEARCH (?x)(?<!\\)\((?:(?:\^[()]|[^()])|(?0))*(?<!\\)\)

    Test it against this sample text :

    DO %%F IN (z y x) DO ( IF %%F==x ( ECHO ‘x’ ^( ) ELSE ( IF %%F==y ( ECHO ^ ‘y’ ) ELSE ( IF %%F==z ( ECHO ‘z’ ) ) ^) ) )
  • Bold, Italic and Underline in UDL style

    4
    0 Votes
    4 Posts
    527 Views
    PeterJonesP

    @dshuman52 said in Bold, Italic and Underline in UDL style:

    stupid user error.

    I hate it when that happens to me. :-)

    Glad you found the problem.

  • default xml file types

    4
    0 Votes
    4 Posts
    293 Views
    PeterJonesP

    @dshuman52 said in default xml file types:

    portable version

    Ah. Yes, if you unzip the portable on top of your config files, you will lose your settings. That is the way of things. If you choose to use the portable, you have to accept that, or learn how to merge the old with the new.

    As far as adding it to defaults, this FAQ explains feature requests.