• How to Recover File during power gone...

    Locked
    1
    0 Votes
    1 Posts
    636 Views
    No one has replied
  • Bug Fold All/Unfold All: cause // { comments

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Gilles GipoG

    @dail Oh ! OK, I understand, now…
    It’s totaly logic, but I dindn’t think to see in that direction.

    The solution is easy to find, now : I only have to cope with this, and avoid to stick those specific characters :)
    …and it works!
    Thanks! :D

    //if(i != iTab){ // a space beetween { and // (...) // } // a space beetween // and }
  • No new syntax in black themes

    2
    0 Votes
    2 Posts
    1k Views
    AZJIO AZJIOA

    You can select the color using the HTML page
    https://pastebin.com/3Csbu1ZW
    Open in your browser

  • docs/wiki - Regular Expressions - Example 2 not correct

    5
    1 Votes
    5 Posts
    3k Views
    guy038G

    Hi, @kusalux, and All,

    Yeah ! it’s always the same story ! Everyone which codes, or even builds a regex, before writing the first line, should ask himself, about all aspects of the program or the regex to create ;-))

    Regarding your analyse about fair dates or wrong ones, an other guy could have a totally different approach about what it’s right or not ! Theoretically, in your case, you should recapitulate all possible valid dates and all possible valid formats of date that you consider as right ones ! I do understand that this is, generally, not an easy task !

    For instance, you said that the syntax 10.11.12. should be taken as valid. But, now, the syntax 10.11.12.13 looks rather like an IP address ! And if your last example it.10.11.12 is supposed correct, too, then a date, embedded in text, like , for instance, abc.27.06.12.def should be a valid format of date !

    Of course, when building the regexes, in my previous post, I just imagined them, according to my way of considering correct formats of date and how the should be located among all surrounding text ! Now, let’s imagine that you previously thought and defined the list of all valid formats of date ( for YOU ! ) then, half work would be already done and, to get the right regex should be easier to achieve :-))

    In addition, you may have a different look to the date problem, later, working on different files ! Indeed, regexes strongly depends on the current file contents, which could end to very different regexes for similar kinds of search ! And, honestly, when a regex seems too specific or complicated, and can be used in very few cases, only, I rather think that it’s not a useful regex, anyway :-))

    If you do need information on regexes, I could help you, but I’m sure than you can cope with these strange things ( the regexes ) by yourself :-))

    Cheers,

    guy038

    P.S. :

    Above all, I forgot to point out, that a script or a programming language is a better way to verify dates than regexes, anyway !

  • Regular Expressions LF∉\h LF∈\v

    6
    0 Votes
    6 Posts
    2k Views
    MAPJe71M

    I just asked to correct the error in the help

    AFAIK you just indicated there is an error on the linked page, you didn’t ask for a correction :-)
    Furthermore, there is no error on the page.

    If there is a difference in behavior, this should be indicated in the description, so that everyone does not ask the same question again.

    Agreed, although keep in mind that the difference wasn’t known of by many (AFAIK, well at least not by me) until @guy038 posted his topic.

  • 1 Votes
    1 Posts
    865 Views
    No one has replied
  • Request to keep settings on update

    Locked
    4
    0 Votes
    4 Posts
    1k Views
    NippurDeLagashN

    @Scott Summer

    Yes, it is drastic but unfortunately, I got quite allergic to automatic updates. Notepad++ has no blame, however, after gigabytes downloaded on a monthly basis, it does not take too long for machines to become cluttered, sluggish, and useless.

  • 0 Votes
    3 Posts
    2k Views
    Steffan RhoadsS

    @Claudia-Frank : that was the trick. I presume I set something that was causing the problem myself (seems odd to manifest that way). Thank-you, I was trying Visual Code & Sublime but really prefer Notepad++. Thank you!

  • -1 Votes
    3 Posts
    9k Views
    guy038G

    Hi, michael-poplawski, @Scott-sumner and All,

    Just a variant of the Scott’s solution :

    SEARCH [^\r\n](?=\R\h*\d+\.\h+)

    REPLACE $0\r\n

    Notes :

    The searched string is, essentially, the part [^\r\n], which represents any single character, different from, either, the Carriage Return and the New Line characters

    But the regex engine will consider this match ONLY IF the positive look-ahead (?=\R\h*\d+\.\h+), ending this regex, is true. That is to say, IF it is, immediately followed with a Line Break ( \R ), some horizontal blank characters, even 0 ( \h* ), at least one digit ( \d+ ), then a literal dot ( \. ) and, finally, at least, one horizontal blank character ( \h+ )

    If this condition is true, in replacement, that single character is, simply, rewritten, due to the $0 syntax, with represents the overall match, and followed by the usual \r\n sequence, which defines a Windows line-break !

    Best Regards,

    guy038

  • Right Click >> Find All in Current Document

    12
    1 Votes
    12 Posts
    8k Views
    Scott SumnerS

    @Cem-Kaval

    In the time since the original posting I have changed how I do this function. I no longer use an AutoIt script. But here’s how I would set it up again if I were doing it:

    Create (and test) the functionality as a Run menu entry. For example, this might be something you would put in the The Program to Run box: "C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "c:\example_script.au3".

    Execute this command to see that it actually works! (rather important before proceeding)

    Save this new Run menu command with a name, e.g. AutoIt3 TEST

    After it is tested and is working via the Run menu, then you can make a right-click context menu entry out of it. Edit the contextMenu.xml file and where you feel it is appropriate add a new line like this::

    <Item MenuEntryName = "Run" MenuItemName = "AutoIt3 TEST" />

    After restarting Notepad++, if all has gone well, you should see your new entry when you right click in a document tab window.

  • [Feature Request] Auto Save Session

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Garry MusgraveG

    Here is the debug info:

    Notepad++ v7.5.4 (32-bit)
    Build time : Jan 1 2018 - 01:47:45
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Admin mode : ON
    Local Conf mode : OFF
    OS : Windows 7 (64-bit)
    Plugins : ComparePlugin.dll DSpellCheck.dll DSpellCheck2.dll mimeTools.dll NamedBookmarks.dll NppConverter.dll NppExport.dll NppTextFX.dll PluginManager.dll PythonScript.dll SpellChecker.dll WebEditU.dll

    I’m sorry… “crash” was a poor choice of words. I should have said “improper shutdown”, for example a power outage (these are relatively frequent here).

    I should add that I think that this is relatively recent behaviour. I’m fairly sure that this didn’t happen in the past, so it could be something in an update. I think this has only bothered me in the last “little while” (I auto re-boot once a week, so if this had always been the case I would have noticed). Since I auto re-boot every Sunday am, I noticed it again this morning and decided to post this. The time before this was mid-week after a re-boot caused by a Windows update. Unfortunately, I have a poor sense of time, so I can’t honestly say how recently (or how many updates ago) I think it worked. My sense is that this is relatively recent. Sorry that I can’t be more specific. I’ve been using this program for many, many years, and use auto updates.

    Thanks

  • Unicode BLANK characters and the regexes \h , \v and \s

    Locked
    4
    5 Votes
    4 Posts
    3k Views
    guy038G

    Hi, @mapje71, and All,

    In the web page, below :

    http://www.regular-expressions.info/refcharclass.html

    It is said that the regex [\v] adds the “vertical tab” control character (ASCII 0x0B) to the character class, without adding any other vertical whitespace, which is confirmed by the given example !

    So, seemingly, it’s a current restriction of the \v regex, in a character class !

    Best Regards,

    guy038

  • functionList.xml - more different 'function' definitions?

    8
    0 Votes
    8 Posts
    3k Views
    guy038G

    Hello, gehe-online,

    The crypto writing of regexes, as you say, are not that difficult. Just an other language, as thousand other ones !

    Regarding the regex, in your functionList.xml file, below :

    mainExpr=" (?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?ms) # - ^, $ and dot match at line-breaks ^\h* # optional leading white-space at start-of-line (?:beginsub\s+)? name\s*=\s* \K # discard text matched so far [\w.^+-]+ "

    Here are some non exhaustive explanations, on this regex :

    First, the (?x) modifier tell the regex engine that the free-spacing mode is ON So, any non-escaped space character, as well as comments, beginning with the # symbol, will be ignored

    Then, the (?ms) modifiers, which could be rewritten (?m)(?s), means that :

    The ^ and $ assertions represent, respectively, any start and end of line ( (?m) )

    The dot . special character matches any single character, even an End of line one, like \r and \n ( (?s) )

    Now, the part ^\h* represents any sequence, even empty, of horizontal blank characters, at start of line ( note that * is a shortcut for the {0,} quantifier, meaning present 0 or any time )

    Afterwards, the (?:beginsub\s+)? searches for the beginsub key-word, in any case, followed by, at least, one blank character, as the + quantifer is a shortcut of the {1,} one.

    As that range is enclosed in a non-capturing group (?.....), followed with the ? quantifier ( which is a shortcut of {0,1} ) this implies that the part beginsub\s+ may be present or not

    Then, the name\s*=\s* part tries to catch the name key-word, followed by optional blanks chars, then the = sign, and followed, again, with optional blanks chars

    Now, The \K syntax, tell the regex engine to forget anything matched, so far ! Note that the previous match was mandatory to get an overall match but, now, the regex engine just has to consider the remaining of the regex

    Thus, the final part, to match, is the regex [\w.^+-]+ which represents a character class feature, that is to say, a single character, enclosed in the [....] structure, which must be present, at least, one time ( remember, + == {1,} quantifier )

    To end with, any single character, which composes the name, of each key-word NAME, can be, either :

    A word character ( \w ), that is to say, a classical letter, an accentuated letter, a digit or the _ symbol

    A circumflex accent ( ^ )

    A dot punctuation sign ( . )

    A plus mathematical sign ( + )

    A minus mathematical sign ( - )

    Remark : for further information on Unicode Blank characters, refer, also, to the link, below :

    https://notepad-plus-plus.org/community/topic/15279/unicode-blank-characters-and-the-regexes-h-v-and-s/1

    gehe online, I hope that, now, you can figure out the general template of a regular expression !

    Best Regards,

    guy038

    P.S. :

    For noob people, about regular expressions concept and syntax, begin with that article, in N++ Wiki :

    http://docs.notepad-plus-plus.org/index.php/Regular_Expressions

    In addition, you’ll find good documentation, about the Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v5.8 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :

    http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

    http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html

    The FIRST link explains the syntax, of regular expressions, in the SEARCH part

    The SECOND link explains the syntax, of regular expressions, in the REPLACEMENT part

    You may, also, look for valuable information, on the sites, below :

    http://www.regular-expressions.info

    http://www.rexegg.com

    http://perldoc.perl.org/perlre.html

    Be aware that, as any documentation, it may contain some errors ! Anyway, if you detected one, that’s good news : you’re improving ;-))

  • Toggle Single Line Comment vs Single Line Comment? Why do we have both?

    8
    1 Votes
    8 Posts
    2k Views
    Claudia FrankC

    @Ahu-Lee

    to be honest, I don’t do much html and because of that I never checked what the issue here
    is, it might be npp or it might scintilla, but yes, it is inconsistent in that case.

    Cheers
    Claudia

  • Doubleclick on delimiter

    Locked
    10
    0 Votes
    10 Posts
    3k Views
    A KA

    @dail said:

    Settings > Preferences > Delimiter > Allow on several lines

    It solves almost all problems!
    In this case, we only need an option that sets whether to select delimiters or not.

    Of course Scott is right, delimiters should be assigned to the current language. Or at an additional setting.

    And further. It would be nice to have [ctrl + alt + b] work anywhere between the parentheses (like dblclck + ctrl). In this case, if you press [ctrl + alt + b] several times, the selection should expand to the next and next delimiters.

  • 0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Ryan-Lloyd

    So here’s how it works. It takes your selection and assumes that you want to open that as a file (or files). If your selection contains spaces and doesn’t have double quotes, then each space-separated “token” will be considered a different file. If each token doesn’t contain path information, Notepad++ will attempt to open that “file” in the current folder (which in the portable install I use, is the folder that Notepad++.exe lives in). If the “intended” file isn’t found, Notepad++ will prompt to create it.

    I think this as described is what you are seeing. I don’t think of it as a “bug”, but maybe just something that is less than ideal. :-)
    If you are going to use this feature, I’d suggest being careful about what text is selected when you activate it.

    Contrast this behavior with the right-click (in a document tab window) entry Open File. There, if you have a similar selection when invoking the feature, you get a popup box that says The file you’re trying to open doesn’t exist. Perhaps it would be better if the Run menu’s version worked similarly…

  • Match and replace specific word between two tag symbol

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    guy038G

    Hello, @jade-owen,

    I’m a bit perplexed ! Indeed, from your example, it looks as you would change the upper-case string ROOM with the upper-case string SPACE, when within a <div>.......</div> range, only… and NOT the LOCAL string !!

    If it’s really what you want, the regex, below, should do the job, strictly !

    SEARCH (?-is)(<div>.*?LOCAL..-)(.*?)(?=..-.*?</div>)

    REPLACE \1SPACE

    OPTIONS Tick the Wrap around and Regular expression options

    ACTION Click, once, on the Replace All button, or several times on the Replace button

    Best Regards,

    guy038

    P.S. :

    Generally speaking, it’s important to point out that regexes are very dependent of the text they are applying against ! Even a simple additional space character, in a text, can break out matches detection of a well-formed regex !

    So, I advice everyone, which wants a specific search/replacement, to carefully describe :

    The searched text which must be matched

    The replacement text which will be inserted, instead

    Doing this way should help out to build the right regex(es) and assures you to get a quicker solution, too ;-))

  • Bug (?) Window title with Unicode filename shows ???????.??? v7.5.4

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Stephan-Hodges said:

    looks like mine is behaving differrent, the window title shows the symbols but the tab text doesn’t.
    Maybe related to the fact that I’m using Linux/Wine.
    Unfortunately the setting to change the tab text is deactivated.

    As of screenshots, you are right, you can’t attach in the forum but what you can do is to upload
    to image hosters like imgur and use a sysntax like

    ![](https://i.imgur.com/g5lKm4K.png)

    and you get a result like this

    Cheers
    Claudia

  • Notepad++ does not allow a default page orientation

    3
    0 Votes
    3 Posts
    4k Views
    raj66kasR

    There is no page orientation settings at the file level. When printing a file, you can use the printer driver settings to print in the Landscape mode.

  • Will Notepad ++ save a notepad (windows version ) file?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    DaveOnGitHubD

    Thanks for getting back to me. What I want is to use Microsoft Notepad and have Notepad++ save the file every so often. Something caused Windows to shut down and I don’t think it was me. I lost a document that I had not saved for a while. So I’m trying to avoid that in the future.
    I will look at what you have suggested. To be frank though, I have no clue what to disable. As to the 7z format you speak of, I have no idea what you are talking about. I found a download button on the website and clicked it. I clearly have some homework to do. Please stay in touch. I will write when I have a better understanding of the program. Thanks, Dave