• Collect duplicates in doc before sign

    2
    0 Votes
    2 Posts
    234 Views
    Mark OlsonM

    @Richie
    How many lines of data do you have? The optimal solution for this problem can vary a lot depending on how much data you have.

    Also, are all the entries with duplicate values before the # consecutive? For example, are all T-shirt entries grouped together, or are there non-T-Shirt entries between the first T-shirt entry and the last?

    Assuming the entries with duplicate values before # are grouped together, a reasonable solution (even for a large amount of data) would be as follows:

    Go to the find/replace form, Mark tab (Ctrl+M with default hotkeys) With Bookmark line selected and using Regular expression as search mode, enter (?-s)(^[^#\r\n]+)#.*\R(\1#.*$\R?)+ into the Find what box, and hit Mark all. Notes on this regular expression (general resources available here): (?-s) means that the . metacharacter won’t match newlines. (^[^#\r\n]+)# tries to match a sequence of characters that are not # or a line-end character at the start of a line followed by #, and then stores it as capture group 1. .*\R matches any number of non-newline characters, then a newline. (\1#.*$\R?)+ matches at least one line where the thing before # in the first line is followed immediately by # and then any number of characters before the end of the line ($) and then possibly a newline (\R? - the only thing there could be other than a newline here is the end of the file) You will see all the lines with a duplicate entry before # marked. Use Search->Bookmark->Remove Non-Bookmarked lines from the main menu. Now all the entries with no duplicate before the # will remain.

    Note that the Remove Non-Bookmarked lines operation can be rather slow if the number of lines to be removed is large (say, 10 thousand or more). If that’s a problem, you can use Copy Marked Text (the third button under the Mark all and Clear all marks buttons in the Mark form) instead to copy the text that you marked in step 2, then paste it into another buffer (or select the entire original file and paste over it). You’d have to do some simple regex-based postprocessing of the result after that, but I’ll leave that as an exercise for you.

    If the entries with duplicate values are not grouped together, you will need to sort the entries by the value before the #, and then follow the steps above. This sorting is difficult to achieve without a custom script, but fortunately I and fellow forum regular AlanKilborn have already written such a script.

  • Print error 0x80040003

    11
    0 Votes
    11 Posts
    4k Views
    xomxX

    @mkupper
    It probably works so that when N++ calls the printing WINAPI, that system call always checks for the above RegKey first and then adapts the appearance of the Print-dlg.

    Because I could not reproduce the problem myself, I can only guess what a real problem is. Because the printing basically works (with admin-rights), perhaps the MS will be able to fix it in a later build.

  • Dutch as install language, instead of English

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    donhoD

    @Rich-Hisgen
    Does this problem persist for the latest version (v8.5.7)?

  • How to change word and numerate this document!!

    5
    0 Votes
    5 Posts
    381 Views
    Claudio RaphaelC

    @Coises

    Sir, you are awesome!! Thank u very much.

    Claudio Raphael

  • Assistance Required: Recovery of Corrupted Notepad++ Tabs

    3
    0 Votes
    3 Posts
    444 Views
    PeterJonesP

    @M-Socin said in Assistance Required: Recovery of Corrupted Notepad++ Tabs:

    I have had 25 tabs open in Notepad++ since around 2019, which, due to the program’s auto-reopen feature, I never found the need to save.

    You’ve had the same unsaved files for 4+ years?! First, you’ve been lucky to date. Second, I highly recommend changing your data practices – see our FAQ section on the Backup / AutoSave, to figure out how to set things up to be safer so that you’re less likely to lose your data.

    That FAQ also has some suggestions for things you can try to recover lost data – including describing the directories that things might be in, depending on your settings; but Notepad++ doesn’t have built-in file recovery, so if the file is corrupt or lost, there is nothing we or Notepad++ can do for you; the FAQ mentions that you might have success using external recovery tools, but we don’t guarantee that will work nor are we experts at their use.

    .'¨}ö& 3iŮa]ž<Á«PŮ×vo ...

    That looks like a binary file. If it didn’t used to be a binary file, then one of a few things happened:

    A Windows crash corrupted the files. You were infected with a virus, and the virus has corrupted your files.

    Since you didn’t ever actively save or back up your important data, that data is likely lost in either case, but recovery software (as mentioned at in the FAQ) might be able to find some of your files (though it might be an older version). Good luck.

    For the future, I highly recommend following data best-practices, as described in the FAQ, and taking an active role in making sure you don’t lose important data in the future (whether you edit that data in Notepad++ or any other tool; no single tool can guarantee 100% that you won’t lose data due to circumstances outside their control).

  • Auto completeion is not working

    3
    0 Votes
    3 Posts
    245 Views
    PeterJonesP

    @Jayden-Gird said in Auto completeion is not working:

    It does nothing.

    Do you have other text in your file yet? If not, then the “word completion” half of the auto-completion feature will not do anything, because “word completion” requires other words to be in your file.

    Do you have a Language set in the Language menu (like HTML or C++ or anything else from that menu)? If not, then the “function completion” half of that feature will not do anything, because “function completion” requires an active programming language to be set.

  • Deploying Notepad ++ from SCCM console

    1
    0 Votes
    1 Posts
    343 Views
    No one has replied
  • installing notepad++ portable zip

    2
    0 Votes
    2 Posts
    216 Views
    Terry RT

    @zeta-orionis
    Try the online manual here.

    Terry

  • Searching random duplicate numbers/values in Notepad++

    15
    0 Votes
    15 Posts
    2k Views
    Alan KilbornA

    @Mark-Olson said in Searching random duplicate numbers/values in Notepad++:

    I don’t particularly appreciate people (cf. AlanKilborn) nitpicking my solution, which was perfectly adequate for this problem.

    Too bad? We try to keep things “on track” here. If something devolves into “I’ll write what is effectively not a Notepad++ solution” here, it shouldn’t be here.

  • How to silent install NPP 7.7 ? (MDT installation)

    4
    0 Votes
    4 Posts
    10k Views
    LeroyDemarcusL

    Have you tried googling it?

  • Removing Text Before and After dialogue.

    5
    0 Votes
    5 Posts
    1k Views
    Borderless MediaB

    I want to Thank you guys for this. Yesterday I tried Peter’s code first and it worked but there were still some things left behind. Inevitably i found a wayto cancel them out so great work either way.

    Terry for some reason My Notepad++ freezes when i used your method to replace all.

    Guy038, yours worked perfectly. It got rid of everything and also spaced out the lines. I intended to put them into a word doc and realized that word automatically spaces out lines so it seems I put you guys through a bit more work than needed but those codes got the job done. I won’t be needing further help on this i believe.

    Thanks again and warm regards

  • How Do I Remove Highlighted CTRL F & LF From Each Line of Text?

    36
    0 Votes
    36 Posts
    6k Views
    PeterJonesP

    @Troglo37 said in How Do I Remove Highlighted CTRL F & LF From Each Line of Text?:

    If I install the new plugin, will it remove the arrow?

    No, it won’t. The + ▼ ✕ are not on the toolbar, they are on the menu bar. They are two different things.

    Will there be two arrows since the current one is in the right corner too? Or will the new plugin simply add the ¶ “Show All Characters” feature to the arrow pull-down?

    ??? I think you are confused. The CustomizeToolbar allows you to show or hide buttons on the existing toolbar, or to add new custom buttons to your toolbar.

    Here’s a screenshot of what mine looks like in the righthand side when I’ve got a narrow window, with Customize Toolbar active:

    47bd95d4-f083-41a6-a530-303ab4349c41-image.png

    The + ▼ ✕ are all still there. And on the toolbar, since there are more buttons than fit on screen, it uses a » to access any remaining ones.

    But none of that has anything to do with hiding the ¶ “Show All Characters” button. If you use Customize Toolbar to hide it, it will use everything else from your toolbar, except it just won’t show that one button.

  • Delete specific lines in file

    6
    0 Votes
    6 Posts
    799 Views
    Mark OlsonM

    @Mark-Olson said in Delete specific lines in file:

    FIND: [[012]]:

    Yeah, I’m aware that my regex was wrong.

    I intended to enter \\[[012]\\], but apparently even after the recent upgrades to the forum it still has the issues with escaped squarebraces.

    I had to test to see if the issue was still there, but didn’t have time to fix my post after it came out wrong.

  • Alternative method of UDL association that file suffix possible?

    6
    0 Votes
    6 Posts
    970 Views
    PeterJonesP

    I previously said,

    [I’ll] give it a try

    This is what I came up with:

    INSTALLATION

    Follow the instructions https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
    to install PythonScript Plugin and save this script as SelectUDLBasedOnShebang.py You will want to follow the “Starutp script” instructions in that FAQ as well, with the following two linesimport SelectUDLBasedOnShebang selectUDLBasedOnShebang = SelectUDLBasedOnShebang.SelectUDLBasedOnShebang()

    CONFIGURE:

    Go to the line with “CONFIG =” and edit the contents the extension should include the dot in the quotes the firstLineText is the text that should match the “shebang” line (the first line of your file) the NameOfUDL must match the name of your UDL exactly Save Run the script (Plugins > Python Script > Scripts > SelectUDLBasedOnShebang) or restart Notepad++

    SCRIPT: SelectUDLBasedOnShebang.py

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/24921/alternative-method-of-udl-association-that-file-suffix-possible If the extension is right, and the shebang line is right, set to a specific UDL INSTALLATION 1. Follow the instructions https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript to install PythonScript Plugin and save this script as `SelectUDLBasedOnShebang.py` 2. You will want to follow the "Starutp script" instructions in that FAQ as well, with the following two lines import SelectUDLBasedOnShebang selectUDLBasedOnShebang = SelectUDLBasedOnShebang.SelectUDLBasedOnShebang() CONFIGURE: Go to the line with "CONFIG =" and edit the contents - the extension should include the dot in the quotes - the firstLineText is the text that should match the "shebang" line (the first line of your file) - the NameOfUDL must match the name of your UDL exactly Save Run the script (Plugins > Python Script > Scripts > SelectUDLBasedOnShebang) From now on (including after restart), anytime you activate the buffer of a file ending with a known extension (one of the extensions in CONFIG), it will look at the first line, and if the first line exactly matches one of the firstLineText strings in the CONFIG table, then it will activate the UDL that has exactly the NameOfUdl """ from Npp import editor,notepad,console,NOTIFICATION import os class SelectUdlBasedOnShebang(object): CONFIG = { ".mscript" : { # the extension, including the . "#UDL!mscript1": "mscript1", # firstLineText : NameOfUDL "#UDL!mscript2": "mscript2", # firstLineText : NameOfUDL }, ".ext" : { # the extension, including the . "#UDL!ext1": "ext1", # firstLineText : NameOfUDL "#UDL!ext2": "ext2", # firstLineText : NameOfUDL }, } def __init__(self): '''Initialize the new instance''' current_version = notepad.getPluginVersion() if current_version < '2.0.0.0': notepad.messageBox('It is needed to run PythonScript version 2.0.0.0 or higher', 'Unsupported PythonScript verion: {}'.format(current_version)) return # setup callbacks notepad.callback(self.on_bufferactivated, [NOTIFICATION.BUFFERACTIVATED]) console.write("Registered on_bufferactivated callback for SelectUdlBasedOnShebang\n" ) # run the initial check self.check_for_udl(notepad.getCurrentBufferID()) def on_bufferactivated(self, args): ''' This callback called every time document is switched. Triggers the check if the document is of interest. Args: provided by notepad object; the args of interest: args['bufferID']: ID for the activated buffer Return: Nothing ''' self.check_for_udl(args['bufferID']) def check_for_udl(self, bufferID): ''' Check if the active buffer has a known extension for shebang processing If so, trigger the UDL-change Args: bufferID: ID for the buffer of interest Return: Nothing ''' filename = notepad.getBufferFilename(bufferID) (_,ext) = os.path.splitext(filename) if ext in self.CONFIG: self.check_shebang( self.CONFIG[ext] ) def check_shebang(self, shebangs): ''' Check if the active buffer has the right shebang If so, set teh UDL Args: shebangs: dict mapping shebang to corresponding UDL name Return: Nothing ''' firstLine = editor.getLine(0).rstrip(); if firstLine in shebangs: found = shebangs[firstLine] notepad.runMenuCommand('Language', found) if __name__ == '__main__': selectUdlBasedOnShebang = SelectUdlBasedOnShebang()

    If I do any more development on this, updated versions can be found at https://github.com/pryrt/nppStuff/blob/main/pythonScripts/nppCommunity/24xxx/24921_SelectUDLBasedOnShebang.py

  • Can't confirm E-mail for this Community

    2
    1 Votes
    2 Posts
    308 Views
    Terry RT

    @tfnab
    There is FAQ post about this here.

    Terry

  • How to run a find function with multiple data points

    3
    0 Votes
    3 Posts
    425 Views
    VerbobossV

    PeterJones thank you

  • Latest Update deleted NppCrypt plugin

    2
    0 Votes
    2 Posts
    487 Views
    PeterJonesP

    @Terry-TeeEss-Syndergaard ,

    My assumption is you were using an older version of NppCrypt. When Notepad++ updated, it was no longer compatible with that old version, but would allow you to install the new NppCrypt.

    Unfortunately, as stated in the FAQ by the NppCrypt author, there was one point where the NppCrypt author changed the algorithm (between 1.0.1.5 and 1.0.1.6), which made files encrypted under the old version no longer work with the new version.

    The FAQ suggested putting the old DLL in the right folder, then unencrypting, then re-installing the most recent NppCrypt and re-encrypt the files. However, if the old version of NppCrypt is no longer compatible with Notepad++, you will want to change the sequence slightly:

    download an older portable Notepad++ – it would have to be one before the 1.0.1.6 version of nppCrypt was released (Mar 2019), so I suggest v7.6.3, which I just confirmed will properly install NppCrypt 1.0.1.5 from Plugins Admin. Unencrypt your file(s) with the portable Notepad++ v7.6.3 with NppCrypt 1.0.1.5 Open the unencrypted file(s) with your recent Notepad++ with NppCrypt 1.0.1.6, and encrypt using the new algorithm If you’ve done this for all your encrypted files, you shouldn’t need the portable copy of Notepad++ anymore
  • How to dock Search results window?

    4
    0 Votes
    4 Posts
    7k Views
    AntonA

    Wow, thanks!
    I’m so stupid! Double click works perfect.
    I didn’t guessed it and suffered from this floating panel all last week.
    I was looking for some option in settings to get all back but double click is much better.

  • Version 8.5.7 doesn't recognize some files with html ext

    2
    0 Votes
    2 Posts
    216 Views
    PeterJonesP

    @Edward-Mcdaid said in Version 8.5.7 doesn't recognize some files with html ext:

    New files

    Have you tried saving the file, so that it knows what kind of file it is?

    If you want all new files to start as HTML, you can set that in Preferences > New Documents , otherwise you have to manually tell Notepad++ what file type it is, either by saving or by using the Language menu

    Actually, now I see that your title mentions .HTML extension… so check the Style Configurator for HTML: if it doesn’t list the four-lettee extension, you might have to add it to your user extensions. (I thought it was there by default, but maybe I’ve misremembered, or something got messed up in your installation)

  • Search Result font size/zoom level

    2
    0 Votes
    2 Posts
    409 Views
    Alan KilbornA

    @tordenflesk said in Search Result font size/zoom level:

    recent update of np++

    It’s traditional when making a complaint to cite the version you are currently running, as well as the version you were last running when it worked properly (if you can remember that, of course).

    search results text is blurred

    I have never seen such blurriness in only certain windows of the program. Just a wild thought here, but maybe experiment with the Direct Write setting. Probably won’t have any effect, but it is about the only thing that comes to mind for me.

    Anyway to set the default font size/zoom level?

    Not specifically and independently for Search results. The zoom level goes back to zero when Notepad++ is exited and restarted. The font size after a restart is the same as the font size for the editing window (at its zoom level 0). Side note: The zoom level for the main editing window IS retained from run to run of Notepad++.