• 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
    452 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
    530 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
    295 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.

  • Global font size

    7
    0 Votes
    7 Posts
    2k Views
    dshuman52D

    Reproduction steps. I cloned a file that filled the window so it appears in both screens. I did a CTRL- on the right panel making the font smaller. I also did a CTRL+on the left panel making the font larger. To attempt to standardize the font sizes as noted I opened the styler window and changed the font size to 9 clicked save&… then back to 10 and clicked save&… both times with all 5 of the enable global … check boxes were checked. It may be the planned action but the CTRL- and CTRL+ differential was maintained in the both panels. Should there be a means of setting all panels to the same font. Thanks for your clarification – this may be a better question, that can be reproduced
    .

  • Can I use Notepad++ to bypass Roblox Chat Filter?

    2
    -2 Votes
    2 Posts
    2k Views
    No one has replied
  • Arduino Activ Line not visible

    6
    0 Votes
    6 Posts
    377 Views
    Elodie CEMOIE

    Thank you very much Peter !

    If I had knew that this update will put this mess, I would have kept my previous 7.8.1 version that was just perfect…

    By the way: Happy New Year !

  • Start NP++ in elevated mode

    6
    0 Votes
    6 Posts
    968 Views
    rddimR

    I don’t have success with runas but powershell do the job. Place the text below under the <UserDefinedCommands> section in the shortcut.xml. It will start another instance of Npp with Admin mode.

    <Command name="Run Notepad++ in Admin mode" Ctrl="no" Alt="yes" Shift="no" Key="0">powershell.exe -Command "Start-Process '$(NPP_FULL_FILE_PATH)' '-multiInst' -Verb runAs"</Command>
  • Export Import NPP Settings, Styles and Sortcut Mapper

    6
    1 Votes
    6 Posts
    24k Views
    maprangsoftM

    @Igor-Minin thank you.

  • In 2020...

    4
    3 Votes
    4 Posts
    394 Views
    andrecool-68A

    @guy038 I said that your friend does stupid things and sends you spam

  • Is it possible to add to the forum "select \ copy source code"

    9
    1 Votes
    9 Posts
    2k Views
    guy038G

    Hello @dail,

    I’m taking advantage of the fact that you’re on-line…, to tell you how your Elastic Tabstops plugin is magical ! Especially when using the Convert TabStops to Spaces option ! )

    It saves me quite a lot of time when making tables and I’ve just been using it to reformat a TSV file from my bank, which recapitulates all my operations of the last six months !

    BTW, would it be easy enough to add other characters than space chars, for the minimum padding between each field ?

    I mean, in the ElasticTabstops.ini file, instead of the default line padding 1, with the number of space chars, you would allow a string standing for all the padding zone. For instance, the string " | "

    With this new syntax, the | delimiter would be automatically inserted, with two space chars, between two fields of the table :-))

    Of course, the default padding would be " " ( 1 space char )

    What is your feeling about it ?

    Cheers,

    guy038

  • bug? find_in_selection

    9
    0 Votes
    9 Posts
    561 Views
    guy038G

    Hi, @alan-kilborn,

    Ah, yes I simply did a GitHub search with the criteria author:sasumner ! So, you’re right and I even found out the 6042 related issue !

    Thus, I’ve just updated my previous post

    Cheers,

    guy038

  • Session snapshot not working with 'Bookmarks@Dook' Plugin

    1
    0 Votes
    1 Posts
    278 Views
    No one has replied
  • 1 Votes
    11 Posts
    5k Views
  • Add "Count" button to a replace dialog

    3
    0 Votes
    3 Posts
    563 Views
    Alan KilbornA

    @andrecool-68 said in Add "Count" button to a replace dialog:

    I do not think that this is a big problem of duplicating this button.

    You must not be a software developer. :-)

    @Alex-3

    First, why do you think this is necessary? I don’t think it is. If you want to Count, switch to the Find tab. Is that a problem?

    Second, what do you want to count? Do you want the Count functionality as it is, or are you intending to count replacements made from, say a future Replace All ?

    If you actually do a Replace All, the status bar of the Find window will show you the count of replacements made. If you think, based upon that count, that the replacement you intended was not what you intended, you can always Undo.

  • "Find in files" special characters not working anymore

    8
    0 Votes
    8 Posts
    3k Views
    GregoriG

    Hello!
    I do not want to create a new topic because my problem is pretty much the same. But I would like to get a short answer, I’m not interested in the character coding stuff.

    So, I have a lot of .cpp files, all of them are ANSI and to my luck, each comment made in Korean language. For example, there is a comment: “ÇöŔç Ŕ§ÄˇżˇĽ­ »çżëÇŇ Ľö ľř˝Ŕ´Ď´Ů.”
    (This means “Not available at this location.” if I change the character encoding to Windows-949 but it is not important now.)

    Few notepad++ patches before I was able to search in my source files for special encoded characters, but nowadays I can’t.

    So my question is, what can I do to fix the search?

    I do not want to install an older version of notepad just because of this, but I think I must. What happened? Why not working correctly the search anymore? What can I do?

    Thank you in advance!

  • Is it possible...?

    14
    0 Votes
    14 Posts
    883 Views
    guy038G

    Hi, @dipsi7772 and All,

    You said :

    Strange thin is, on some files. just <!doctype html> this is the result.
    I would say al files are the same format , so Its mystious.

    It’s not strange and it’s not related to file format at all ! The reason, is that , for files with big size, it may happen that the regex does not work properly and deletes all characters but the first line of your HTML files. Indeed, as the regex is :

    (?s).*?(?-si:pass(word)?.*?>(.+?)(?=</div>))|.+

    The beginning (?s).*?(?-si:pass(word)? means that the regex engine selects all characters, even displayed on several lines, from current position of the caret till the first word pass or password. In some files, this range of characters can be significative and this fact could explain the non-expected results !

    If your HTML files are not important nor confidentiel, simply e-mail me one of these files, which produces errors. I’ll try to find out an other regex which works correctly, in all cases ;-))

    Next, you said :

    Is it maybe possible to implement a rule that avoids duplicate results?

    My question is : In the copied HTML files, that contains the passwords ( 1 per line ), which is the maximum length of these files ?

    Depending of this length, a regex solution may be possible… However, if you don’t mind changing the initial order of these passwords, just use, for each copied HTML file, the two menu options, below :

    Edit > Line Operations > Sort Line Lexicographically Ascending

    Edit > Line Operations > Remove Consecutive Duplicate Lines

    Finally, you said :

    Another thing is, even I choose “Automatischer Zeienumbruch” each line is writte ine ONE line, not in a second one which woud avoid the vertical scrolling.

    I’m sorry because I cannot guess what you’re speaking of :-(( Depending on your file ending characters, discussed previously, and using the appropriate Replace regex :

    \2\r\n for Windows files

    OR

    \2\n for Unix files

    The View > Word Wrap option should work correctly !?

    Best Regards,

    guy038

  • setting save location for note plugin in Notepad ++

    2
    0 Votes
    2 Posts
    851 Views
    Alan KilbornA

    @Susan-Amber-Bruce said in setting save location for note plugin in Notepad ++:

    it would be handy if this setting was available in settings and preferences.

    Plugins don’t (and can’t) use the normal Notepad++ Preferences UI.

    just a little elusive

    TBH, not at all