• installing NPP offline user manual

    2
    0 Votes
    2 Posts
    342 Views
    PeterJonesP

    @zeta-orionis ,

    You click the download link from the user manual homepage, then unzip it into whatever directory you want, and you open index.html from that directory to look at the manual. After you have it on your PC, you are no longer restricted to seeing the user manual just when you have an internet connection.

  • Notepad++ v8.5.7 Installer Hangs on regsvr32 command

    5
    2 Votes
    5 Posts
    2k Views
    xomxX

    @John-Wittle said in Notepad++ v8.5.7 Installer Hangs on regsvr32 command:

    It got up to this following point, and then got stuck

    Probably not a N++ fault.

    You can try (for most of the following you will need admin-rights or it probably silently fails):

    click on the Windows Start (or press the Win-key on your keyboard) type “cmd” right click on the offered Command Prompt app, select Run as administrator in the opened cmd-window - unregister previous attempt before another registering attempt (e.g.: regsvr32 /u “C:\Program Files\Notepad++\contextMenu\NppShell.dll” ) Logoff/logon (a complete reloading of the Windows Explorer for surety…) Then re-register ( regsvr32 “C:\Program Files\Notepad++\contextMenu\NppShell.dll” )

    If still not resolved, try to use the NppShell inherent logging:
    https://github.com/notepad-plus-plus/nppShell/pull/41
    and repeat the above steps.

    Then collect and post here the created %APPDATA%\NppShell\NppShell.log (i.e. C:\Users\[loginname]\AppData\Roaming\NppShell\NppShell.log)

    And do not use the regsvr32 /i ... for the new NppShell (there is not such exported “DllInstall” function in it).

  • Style words depending the end character

    4
    0 Votes
    4 Posts
    332 Views
    PeterJonesP

    @Txote-Lusco ,

    Sorry, the EnhancedAnyLexer plugin doesn’t work that way. It cannot take the matching word from a pattern on one line, and highlight that same text even in different circumstances later.

    You seem to want more features than UDL alone, or UDL-plus-EnhanceAnyLexer, can give you. At that point, the remaining option is to write a custom lexer for your language: but that’s a complicated task, and we’re not going to do that for you; you will either have to write your own lexer, or hire someone to do it for you. (And no, there’s no “request for hire” section in this forum; if someone is interested, they could private-message you using the chat feature in the forum, but this isn’t a “jobs board”.)

    [Also, you originally posted your second message as a separate Topic, but since it was about syntax highlighting in the same UDL, I merged it together, so that people can get the full conversation without having to click links to other discussions.]

  • Notepad ++ Installation and Explorer.exe crash only in Safe Mode

    11
    2 Votes
    11 Posts
    1k Views
    I

    @mkupper Exactly! Thank you for helping to correct this very annoying problem. Have a nice day!

  • All Tabs Removed

    6
    0 Votes
    6 Posts
    2k Views
    mkupperM

    Thank you @Kendall-DeMott

    Are you using roaming desktops or something like Citrix where you can sign in on any workstation and your stuff is usually there?

    Something else is that if a file/tab is not available is not available when you start Notepad++then Notepad will silently close the tab rather than showing file not found errors. If you have files on a file server and the network or server is down at the time you start Notepad++ then Notepad++silently removes the tabs.

    The tabs are in the %AppData%\Notepad++\Session.xml file.

    Open up a few files and then close/exit Notepad++. See if the %AppData%\Notepad++\Session.xml file shows that it has been recently modified.

    Notepad++ only saves the Session.xml file when you exit or close Notepad++.

    Now, restart Notepad++. Are your tabs still there?

    A normal logoff from a Windows desktop session will send exits/quits to all applications. If you do a logoff when Notepad++ is running then it will add a few lines to the %AppData%\Notepad++\nppLogNulContentCorruptionIssue.log file. If you look at that file you should see lines with WM_QUERYENDSESSION, WM_ENDSESSION, etc. where Notepad++ is logging the signals from Windows that the desktop session is about to end. The list of lines ends with one for WM_DESTROY.

    The tab stuff and Session.xml file have not changed in many years and so it’s doubtful an update to Notepad++ would trigger the issues you are seeing.

  • View Current File in portable versions of browsers

    5
    0 Votes
    5 Posts
    423 Views
    deleeleeD

    @Alan-Kilborn said in View Current File in portable versions of browsers:

    If Windows can’t or won’t do that, there’s nothing Notepad++ can do about it.

    Thanks Alan. Obviously Windows is being difficult. However, it’s good to know it’s nothing to do with Npp.

  • Creating a macro that uses search hangs NPP

    2
    0 Votes
    2 Posts
    181 Views
    mkupperM

    @Jason-Quattrini I’m not sure how to do it as a macro but, if you are using regular expression mode your search pattern can be.*pattern.*\R.*\R.*

    The first .* is all of the line before your pattern of whatever it is you are searching for. This bypasses the need for you to press the Home key.

    The .*\R after your pattern goes from the end of the pattern that matched to the end of that line plus \R for the invisible end-of-line character(s) that are at the end of each line.

    The second .*\R picks up all of the second line including the end of line character(s). The third part with .* but no \R picks up all of the third line but not the end-of-line character(s) themselves.

    You can then do search-replace using Replace All and it’ll do what you want without needing to use a macro.

  • Deleting specific words .(in multiple files)

    6
    0 Votes
    6 Posts
    1k Views
    mkupperM

    @Doğancan, please take a look at the Search / Find in files... menu option in Notepad++ as I believe that will do what you want.

    The Find what and Replace with fields are the standard search and replace fields. Filters allows you to search/replace on *.txt files for example. It defaults to blank which is .. Directory is just the directory path of where your files are. Don’t try some path\*.txt as it won’t work… Related to Directory is the In all sub-folders checkbox on the right side. That’s enabled by default. You may want to turn it off.

    You then will do [Replace in Files] but you absolutely should make a full backup of your files first as [Replace in Files] will promptly do the search/replace on all of the files you are filtering for and save those files. There are no backups made by this process which is why you should make your own backups.

    Something that is safer than the [Replace in Files] button is the [Find All] button that is above it. This will scan your files for the Find what pattern and will create a search-results list. You would still need to then click to open the files one by one to test the search/replace.

  • Notepad++ edit existing (C++) syntax

    5
    0 Votes
    5 Posts
    324 Views
    Alan KilbornA

    Yuck to using $ in such a way in C++ – is that really needed? (purely a rhetorical question since this is not the forum for it).

  • Doesn't highlight syntax of .gitconfig files

    4
    0 Votes
    4 Posts
    312 Views
    AntonA

    @PeterJones thanks!

  • Shift+F3 no more works

    15
    0 Votes
    15 Posts
    1k Views
    CoisesC

    I wrote in Shift+F3 no more works that the problem might be:

    the expected result of backward searching with a regular expression is not always well-defined.

    Example of how this could be ambiguous:

    Given the text:
    xabcdefy
    and the regular expression:
    (a..(d..)?|.e)

    when matching normally there is one match — abcdef. When matching backward, is there one match — abcdef — or are there two matches — de and abc?

    What about the regular expression:
    (a..(d.)?|.f)
    matching backward: abcde or ef and abc?

  • Cannot clear "inherit" fg/bg in styler [Possible Bug]

    2
    1 Votes
    2 Posts
    185 Views
    EkopalypseE

    @PeterJones

    Yes, I can confirm that this is also the case for me.

  • How can I make the comment text Python normal instead of italicized?

    3
    0 Votes
    3 Posts
    597 Views
    Peter 0P

    @Mark-Olson Ahhhhhhhhh ok. I had no idea what that style column was for. Thanks a bunch.

  • Replacing text in shortcut.xml reverts to original version

    7
    0 Votes
    7 Posts
    547 Views
    EricE

    I agree Terry. Thanks for your thoughtful response and time.

    My system environment is well locked down including what/how things can be downloaded/installed. I think option #2 may be best bet. Some noted when replacing text within the shortcut.xml file to allow time for file to save versus save and instantly close out of the shortcut.xml file. Anecdotal and not vetted but may be something within virtual environment.

    I consider thread closed unless someone has definitive solution. Thanks again.

  • Broken icon for txt files

    4
    0 Votes
    4 Posts
    1k Views
    deleeleeD

    @mkupper said in Broken icon for txt files:

    That’s excellent news.

    I’m so relieved because it was doing my head in 😂

  • Auto-complete user-defined language.

    1
    0 Votes
    1 Posts
    144 Views
    No one has replied
  • how to use middle mouse button to select text

    3
    0 Votes
    3 Posts
    956 Views
    Alan KilbornA

    @Brother-Creed said in how to use middle mouse button to select text:

    I am aware that we can already do this using alt + shift does this

    That’s for keyboard control of column block selection.
    With mouse (which you seem to want to use), just hold Alt while you click and drag with left mouse button.

    I want to use middle mouse instead as its easier to select and control.

    Alt+Lclickdrag is just as “easy”.

    i want to know if same thing is supported in notepad++

    No.

  • Split string with quotes to new line

    6
    1 Votes
    6 Posts
    12k Views
    J

    @guy038 @mkupper Thank you both for the additional information.

  • Create hyperlinks in Exsisting Table

    8
    0 Votes
    8 Posts
    488 Views
    guy038G

    Hello, @musocity, @coises and All,

    @musocity, I must admit that I shoud have remembered that an HTML link is always defined by a <a> tag, whose the href attribute specifies the link’s destination :-(

    But, in your first post, you textually said :

    So =POPSONG will link to
    httXX://mysongs.com/songs/=POPSONG.mp3

    Which is exactly what I did, in my second reply to you !!

    Now, if you had posted something like :

    I have a lot of <tr> blocks which, each, defines a song’s name, after the <td>/= chars

    For instance, I have this INPUT text :

    <tr> <td>=POPSONG</td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr>

    and I would like to get this OUTPUT :

    <tr> <td><a href="https://mysongs.com/songs/=POPSONG.mp3" title="">=POPSONG</a></td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr>

    I could have given you the exact answer, straight away !

    Now, regarding the replacement of some punctuation chars by their %encoded equivalent :

    I did not consider the -, ~, _ chars and the . dot if followed with mp3, which are non-reserved chars, as well as word chars

    I did not consider, either, the " double-quotes as well as the < and > chars, extensively used in HTML files

    Thus, the remaining characters to test are this list :

    !#$ %&'()*+,/:;=?@[]^`{|}

    Then, I chose this odd name’s song :

    !#$ Name%&of'()*+,/:;the=?@[]song^`{|}

    Followed by .mp3

    I found out a regex S/R which treats all these characters and replace them by their %encoded equivalent, in one go :

    - SEARCH (?:/=|>=|(?<!\A)\G)(?:(?s-i)(?!\.mp3|</a>).)*?\K(?:(\x20)|(!)|(#)|(\$)|(%)|(&)|(')|(\()|(\))|(\*)|(\+)|(,)|(/)|(:)|(;)|(=)|(\?)|(@)|([)|(\\)|(])|(\^)|(`)|(\{)|(\|)|(\})|(\.(?!mp3))) - REPLACE (?{1}%20)(?{2}%21)(?{3}%23)(?{4}%24)(?{5}%25)(?{6}%26)(?{7}%27)(?{8}%28)(?{9}%29)(?{10}%2A)(?{11}%2B)(?{12}%2C)(?{13}%2F)(?{14}%3A)(?{15}%3B)(?{16}%3D)(?{17}%3F)(?{18}%40)(?{19}%5B)(?{20}%5C)(?{21}%5D)(?{22}%5E)(?{23}%60)(?{24}%7B)(?{25}%7C)(?{26}%7D)(?{27}%2E)

    I took inspiration from this post :

    https://community.notepad-plus-plus.org/topic/22690/generic-regex-replacing-in-a-specific-zone-of-text

    To test this regex :

    First, copy the following text in a new tab <tr> <td><a href="https://mysongs.com/songs/=!#$ Name%&of'()*+,/:;the=?@[]song^`{|}.mp3" title="">=!#$ Name%&of'()*+,/:;the=?@[]song^`{|}</a></td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr> <tr> <td><a href="https://mysongs.com/songs/=!#$ Name%&of'()*+,/:;the=?@[]song^`{|}.mp3" title="">=!#$ Name%&of'()*+,/:;the=?@[]song^`{|}</a></td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr>

    Move to the very beginning of the file ( IMPORTANT )

    Open the Replace dialog ( Ctrl + H )

    Un-tick all box options

    - SEARCH (?:/=|>=|(?<!\A)\G)(?:(?s-i)(?!\.mp3|</a>).)*?\K(?:(\x20)|(!)|(#)|(\$)|(%)|(&)|(')|(\()|(\))|(\*)|(\+)|(,)|(/)|(:)|(;)|(=)|(\?)|(@)|([)|(\\)|(])|(\^)|(`)|(\{)|(\|)|(\})|(\.(?!mp3))) - REPLACE (?{1}%20)(?{2}%21)(?{3}%23)(?{4}%24)(?{5}%25)(?{6}%26)(?{7}%27)(?{8}%28)(?{9}%29)(?{10}%2A)(?{11}%2B)(?{12}%2C)(?{13}%2F)(?{14}%3A)(?{15}%3B)(?{16}%3D)(?{17}%3F)(?{18}%40)(?{19}%5B)(?{20}%5C)(?{21}%5D)(?{22}%5E)(?{23}%60)(?{24}%7B)(?{25}%7C)(?{26}%7D)(?{27}%2E)

    Select the Regular expression search mode

    Click once, on the Replace All button ( Do not use the Replace button )

    Important :

    Due to the presence of the \K syntax, in the search regex, you CANNOT use the Replace button and must trigger a global replacement !

    If you just want to know the different occurrences, which will be replaced later, simply use the Find Next or Find Previous button ( or F3 / Shift + F3 )

    And you should get this OUTPUT :

    <tr> <td><a href="https://mysongs.com/songs/=%21%23%24%20Name%25%26of%27%28%29%2A%2B%2C%2F%3A%3Bthe%3D%3F%40%5B%5C%5Dsong%5E%60%7B%7C%7D.mp3" title="">=%21%23%24%20Name%25%26of%27%28%29%2A%2B%2C%2F%3A%3Bthe%3D%3F%40%5B%5C%5Dsong%5E%60%7B%7C%7D</a></td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr> <tr> <td><a href="https://mysongs.com/songs/=%21%23%24%20Name%25%26of%27%28%29%2A%2B%2C%2F%3A%3Bthe%3D%3F%40%5B%5C%5Dsong%5E%60%7B%7C%7D.mp3" title="">=%21%23%24%20Name%25%26of%27%28%29%2A%2B%2C%2F%3A%3Bthe%3D%3F%40%5B%5C%5Dsong%5E%60%7B%7C%7D</a></td> <td>R</td> <td>4/4</td> <td>ev8</td> <td>140</td> <td>Pop Piano Lite Solo Piano</td> <td>Ballad</td> <td>Pop 20</td> <td>2009/12</td> <td>RT 70</td> <td>2</td> <td>2</td> <td>Piano Ballad,Air,Celtic,Country Ballad,Worship</td> </tr>

    Final clarification :

    Do not run this S/R twice ! Indeed, any % char of the encoded chars would be encoded as %25 again !

    Best Regards,

    guy038

  • How to refer named group in RegExp-replacement?

    5
    0 Votes
    5 Posts
    893 Views
    Mark OlsonM

    While we’re here, I’d like to talk about a related useful concept, namely how to reference a named pattern (but not the value captured earlier), which is extremely useful if you have some annoyingly long pattern that you need to match multiple times in the same regex.

    For example,
    (?'int'[-+]?\d+)\h*b+\h*(?&int)
    matches an integer with leading + or minus, some b characters, and then another integer (referenced with (?&int))

    I won’t expound too much on this topic because it’s also in the documentation, but I’ve definitely written many over-long regexes that could have been hugely simplified by this method.