Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      227
      7 Votes
      227 Posts
      110k Views
      guy038G
      Hello, @coises and All, You said, in a previous post : I do think it would be possible, and that it would be a useful enhancement. I haven’t studied the problem in detail yet. The relevant concepts exist and are well-defined: Unicode canonical equivalence and compatibility equivalence. Probably someone has already implemented practical searches using canonical and compatibility equivalence in open source code, To my mind, we do not need the help of anyone to achieve such a feature. Of course, my statement seems a little pretentious, but consider this : In your Search++ plugin’s code, the ONLY thing you have to do, in order to use this fantastic improvement, would be : When the Regex button is selected, to use this layout : □ M̱atch case □ Match all U̱nicode forms □ Free spacing̱ □ Ḏot matches line breaks When the ICU button is selected, to use this layoout □ M̱atch case □ Ḏot matches line breaks □ Free spacing̱ □ Unicode word ḇoundaries Thus, when the Search++ dialog is selected : ALT + B toggle 'Unicode word boundaries' ( ICU mode ) ALT + D toggle 'Dot matches line breaks ( Regex / ICU modes ) ALT + G toggle 'Free spacing' ( Regex / ICU modes ) ALT + M toggle 'Match case' ( Regex / ICU modes ) ALT + U toggle 'Match all Unicode forms' ( Regex mode ) Then, when, both, the Match all Unicode forms option and the Regex button are selected : INTERNALLY, replace ANY character • of the regex, ABOVE \x001F and different from \R, within the search window, by the regex (?=[[=•=]])\X That’s all ! One short example : internally, IF the search dialog contains : The Sarun string, you would change it with the regex (?=[[=S=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=u=]])\X(?=[[=n=]])\X The Šarūn string, you would change it with the regex (?=[[=Š=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=ū=]])\X(?=[[=n=]])\X The Šarūn string, you would change it with the regex (?=[[=S=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=u=]])\X(?=[[=n=]])\X And you can verify that each of these three regexes do match the three strings Sarun, Šarūn and Šarūn , simultaneously !! Best Regards, guy038 P.S. : In the first string Sarun, NO character with an accent In the second string Šarūn, two single chars with an accent ( Š and ū ) In the third string Šarūn, two characters with a base letter ( S and u ) followed with an accent ( ̌ and ̄ )
    • H

      Notes repeated, repeated...

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      7
      0 Votes
      7 Posts
      500 Views
      H
      @PeterJones Forgive me, you’re right. I made a mistake—perhaps my debugging could have been useful, but I just lost my patience (nothing on this damn PC ever works properly; there’s a new problem or annoyance every single day!) In any case, it seems my personal settings had become corrupted; after uninstalling, performing a deep clean, and reinstalling, everything worked as expected—so there’s nothing left to investigate or fix. I apologize for taking up your time unnecessarily. Thanks to everyone.
    • Troglo37T

      Is there a way to find both alphabets, with and without accents, at the same time, when searching?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      15
      0 Votes
      15 Posts
      2k Views
      PeterJonesP
      @DanielCollins said: if you only need it occasionally. In the Find dialog, set Search Mode to Regular expression and write each accented letter as a small character class, for example Rene as R[eéèêë]n[eéèêë] (and add the capital variants at the start if the name can be capitalised). If it’s just occasional then use @coises solution from the very first reply : [[=r=]][[=e=]][[=n=]][[=e=]] … That doesn’t require you to know every possible accented variant, nor need to remember that n can be accented, too, which you forgot. Just manually put the brackets and equals around all the characters.
    • O

      Search and replace window: tab (to navigate) doesn't work as it used to

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      1
      0 Votes
      4 Posts
      352 Views
      PeterJonesP
      @DanielCollins said: It breaks muscle memory … Until the next version arrives, the workaround that works for me is to press Tab twice to get from Find to Replace, That’s rather the point of “breaks muscle memory”. They already figured out they had to hit Tab twice, which is why they came to ask about it. One thing I would add: the checkbox Olli circled has no visible label even when the dialog is widened, so even when you land on it on purpose you cannot tell what you are toggling. Hopefully the reordering fixes that too, or the label comes back. there is nothing to “come back”. There was never a label, because that checkbox is brand new to v8.9.9.1. And it won’t ever get a label, because the Find/Replace dialog is too cluttered already, so like the checkboxes next to the FIND and REPLACE and REPLACE ALL IN ALL OPENED DOCUMENTS buttons, there is no label and never will be; instead, the user is supposed to hover over the checkbox, where the hover text explains what the checkbox does. Or to read the manual, which describes all those checkboxes.
    • Jack SkiJ

      Suggestion: change color on toolbar!

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      107 Views
      Alan KilbornA
      Maybe what is meant here is to be able to start “styling” text on demand. E.g., now I want the text I’m going to start typing to have “Style 3”, then I type some stuff, and now I want to turn off that style and go back to normal. Just a possible interpretation of what OP wants…
    • M

      Building Explorer plugin (64 bit)

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      0 Votes
      3 Posts
      230 Views
      D
      I agree with Coises — for most people, option 1, retargeting the solution to a current toolset, is the simplest path, especially if you are building the plugin for your own use on a modern Windows version. Before you retarget, it is worth deciding who the build is for. If you only need it on your own machine, retargeting and doing a clean rebuild is fine. If you plan to share it or contribute it back, check whether the project still needs to run on older systems, because dropping the Windows XP toolset changes that. After a clean rebuild, test the 64-bit DLL in a fresh copy of Notepad++ and check that Explorer loads and shows the file tree, rather than assuming the build succeeding means the plugin works.
    • Troglo37T

      20 Search Entries Deletes To 10 After Restarting N++

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      228 Views
      D
      Thanks PeterJones, that explains it — 10 is the default limit, so it is not a bug or lost settings, just the history being trimmed on restart. One practical tip for anyone editing config.xml to raise that number: close Notepad++ completely first, and make a backup copy of config.xml before changing it. If Notepad++ is still running when you edit the file, it can overwrite your change when it exits. After restarting, check that the Find history keeps more than 10 entries before relying on it for a long session.
    • R

      [Fork] MarkdownViewer++ (WebView2)

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1
      0 Votes
      3 Posts
      352 Views
      PeterJonesP
      Practical feedback When I tried the “undock” button, it crashed the plugin (giving an error message included in a screenshot) – [image: 1795294404964-mv-wv2.error.png] well, maybe the plugin hasn’t crashed, but that action didn’t work, anyway, because it is not showing the undocked window as expected, but Notepad++ was still running. If I re-start Notepad++ after that error, it started with the panel undocked; this is highly repeatable for me. If I CONTINUE after the crash, and toggle the view of the panel, it displays, and for that run, undock and dock will work. Continued experiments show that if it starts undocked (through that button being used the previous time), then the dock/undock button toggle works right; but if it starts a run docked and I click the “undock” button, it will show that error and not show the undocked window until I tell it to show the preview again (or restart Notpead++). This is bad user experience. Second, when it’s successfully undocked via the button, I cannot use the normal Notepad++ docking panel behavior of dragging it to an edge to re-dock. OTOH, if I don’t use the button, but undock by the normal Notepad++ dragging, then I can drag it back to docked just fine. And if I make the mistake of dragging-to-undock, then clicking the button that’s still labled “undock”, it will crash not just the plugin but the entire Notepad++ application. If you’re going to call the feature “dock/undock”, it needs to work the same as the Notepad++ dock/undock, otherwise, it will cause confusion. So, what does that button gain you that the normal dragging does not? If it’s just the button, could you make it compatible with the normal dock/undock, so it’s just two alternative ways to get exactly the same compatible result? Philosophical feedback Just because the code is open-source doesn’t mean the name is freely available. In general, if you’re going to take over an existing piece of software and develop it from your own fork, you either need to get permission to use the name (like what happened with PythonScript and some other plugins), or give it a new name. Misc [deleted some ranting]: sorry, the earlier version(s) of my post were too harsh. I normally applaud anyone who revives an abandoned plugin, even if I do caution them to ask for naming rights or to rename to avoid trouble. But my rant was too strong, this time. See my post here for a comparison of various of the MarkdownViewer++ alternatives in and/or submitted to Plugins Admin at this point.
    • F

      [New Plugin] XML Tree – FOXE-style XML tree panel

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      4
      2 Votes
      4 Posts
      356 Views
      Mark OlsonM
      @falconefasto Haven’t had a chance to play around with it yet, but I’m the maintainer for JsonTools so I’ve spent a lot of time thinking about and dealing with the various pitfalls that can occur with a tree view of the sort you’re describing. Some thoughts: Does the treenode position work properly when the document contains multi-byte characters? JsonTools parses the document as a UTF-16 string but Notepad++ buffer positions generally assume the document is UTF-8 encoded, so the parser has to take this into account when assigning positions to JSON nodes. Lazy loading is a great idea, but how do you handle a treenode with a lot of direct children? In JsonTools I have a configurable setting for how many direct children a tree node can have, which I arbitrarily defaulted to 10,000. Otherwise the tree can cause NPP to hang even with lazy loading. A context menu that appears when you right-click a tree node seems like a good idea. Off the top of my head, maybe have the options be: select the start tag snap to end tag select the inner XML copy attributes to clipboard recursively expand/collapse all subtrees I can’t give any advice on implementation, since I’ve written all my plugins in C#.
    • Jack SkiJ

      Suggestion: toolbar dropdown feature to select custom text colors while typeing

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      2
      0 Votes
      2 Posts
      53 Views
      PeterJonesP
      @Jack-Ski , There is a post queue for users who have not earned a couple upvotes yet – when you typed both your messages, you were told there was a post queue before you hit the X so you could type. Your other post about colors was already waiting in line. No need to post twice. Regarding feature requests specifically, our FAQ on Feature Requests explains where to make feature requests. But as I replied to your first post, a “manually color my text” selector is a feature of word processors, not of text editors. (Locking this topic; discussion should continue in the other.)
    • Alan KilbornA

      Linked text to open other files into Notepad++

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      30
      4 Votes
      30 Posts
      27k Views
      J
      Also, I modified the initial script to fit my needs because I only needed to get to specific line within document. # -*- coding: utf-8 -*- from Npp import * import os import re def jump_to_match(m): # m.start() gives the exact character offset where the match begins pos = m.start() # Convert the character position to a 0-based line number line = editor.lineFromPosition(pos+4) # Move the cursor to that line and scroll it into view editor.gotoLine(line) editor.setFirstVisibleLine(editor.visibleFromDocLine(line)) class UIAC(object): def __init__(self): self.URL_INDIC = 8 # URL_INDIC is used in N++ source code self.ALT_MODIFIER = 4 self.backslash = '\\' ; self.two_backslashes = self.backslash * 2 self.alt_held_at_click = False self.installed = False self.install() def install(self): if not self.installed: # https://www.scintilla.org/ScintillaDoc.html#SCN_INDICATORCLICK editor.callback(self.indicator_click_callback, [SCINTILLANOTIFICATION.INDICATORCLICK]) # https://www.scintilla.org/ScintillaDoc.html#SCN_INDICATORRELEASE editor.callback(self.indicator_release_callback, [SCINTILLANOTIFICATION.INDICATORRELEASE]) self.installed = True def uninstall(self): if self.installed: editor.clearCallbacks(self.indicator_click_callback) editor.clearCallbacks(self.indicator_release_callback) self.installed = False def is_installed(self): return self.installed def mb(self, msg, flags=0, title=''): return notepad.messageBox(msg, title, flags) def get_indicator_range(self, indic_number): # similar to ScintillaEditView::getIndicatorRange() in N++ source # https://github.com/notepad-plus-plus/notepad-plus-plus/blob/8f38707d33d869a5b8f5014dbb18619b166486a0/PowerEditor/src/ScitillaComponent/ScintillaEditView.h#L562 curr_pos = editor.getCurrentPos() indic_mask = editor.indicatorAllOnFor(curr_pos) if (indic_mask & (1 << indic_number)) != 0: start_pos = editor.indicatorStart(indic_number, curr_pos) end_pos = editor.indicatorEnd(indic_number, curr_pos) if curr_pos >= start_pos and curr_pos <= end_pos: return (start_pos, end_pos) return (0, 0) def indicator_click_callback(self, args): # example: INDICATORCLICK: {'position': 12294, 'idFrom': 0, 'modifiers': 4, 'code': 2023, 'hwndFrom': 1577146} #print('UriIndicatorAltClick indicator click callback') self.alt_held_at_click = (args['modifiers'] & self.ALT_MODIFIER) != 0 def indicator_release_callback(self, args): # example: INDICATORRELEASE: {'position': 12294, 'idFrom': 0, 'modifiers': 0, 'code': 2024, 'hwndFrom': 1577146} #print('UriIndicatorAltClick indicator release callback') if not self.alt_held_at_click: return self.alt_held_at_click = False (start_pos, end_pos) = self.get_indicator_range(self.URL_INDIC) if start_pos == end_pos: return # if click on indicator that is not URL_INDIC uri_text = editor.getTextRange(start_pos, end_pos) (uri_scheme, _, uri_path) = uri_text.partition(':') uri_path = uri_path.replace('%20', ' ').replace('%24', '$').replace('/', self.backslash) ### custom modification myclass=re.search(r'~(.*)$', uri_path).group()[1:] editor.research(r'^\s*{}\b'.format(myclass), jump_to_match, 0, 0, editor.getLength(), 1) ### custom modification # check for optional syntax at end: edit:....txt(L127,C12) goto_line = goto_col = 0 m = re.search(r'\(L(-?\d+)(?:,C(\d+))?\)$', uri_path) if m: uri_path = uri_path[:-len(m.group())] goto_line = int(m.group(1)) if m.group(2): goto_col = int(m.group(2)) if not os.path.isfile(uri_path): # look for a relative path, relative to currently active document try: (valid_dir_of_active_doc, _) = notepad.getCurrentFilename().rsplit(os.sep, 1) except ValueError: # we started out in a "new 1" file, no path on that whatsoever self.mb('Cannot find file:\r\n\r\n{}'.format(uri_path)) return test_path_in_active_doc_dir = valid_dir_of_active_doc + os.sep + uri_path if os.path.isfile(test_path_in_active_doc_dir): uri_path = test_path_in_active_doc_dir else: (test_dir, test_filename) = test_path_in_active_doc_dir.rsplit(os.sep, 1) if os.path.isdir(test_dir): expanded_test_dir = os.path.abspath(test_dir) if expanded_test_dir != test_dir: self.mb('Cannot find file:\r\n\r\n{}\r\n\r\nLooked in this dir:\r\n\r\n{}'.format(test_filename, expanded_test_dir)) return return notepad.open(uri_path) if goto_line != 0: if goto_line == -1: goto_line = editor.getLineCount() goto_line -= 1 if goto_col != 0: goto_col_pos = editor.findColumn(goto_line, goto_col) editor.gotoPos(goto_col_pos) else: editor.gotoLine(goto_line) if __name__ == '__main__': if 'uiac' not in globals(): uiac = UIAC() # will automatically "install" it else: # each running the script toggles install/uninstall: uiac.uninstall() if uiac.is_installed() else uiac.install() print('uiac installed?:', uiac.is_installed())
    • PeterJonesP

      Comparison of the slew of Markdown Viewers Available

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development markdown markdownviewer++ ai generated plugins
      2
      13
      5 Votes
      2 Posts
      205 Views
      D
      Thanks for putting this together, Peter — this table is exactly the kind of comparison I was looking for before installing yet another Markdown plugin. The Sync and Local Images columns are the ones that matter most to me: I write long notes with local screenshots, and a preview that drifts out of sync with the editor is more distracting than no preview at all. Two columns I would find useful if you keep updating the table: whether the preview follows Notepad++ dark mode, and how each plugin behaves with large files. On my setup a few thousand lines is where some viewers start to lag on re-render, and that is the point where I usually give up on a plugin. For my own use the shortlist from your table is the WebView2 fork, MahiMarkD++ and MarkLens, mainly for the combination of two-way sync, local images and a table of contents. I will try the WebView2 fork first since it is the one I already have a feel for, and report back if I find anything that differs from your table.
    • Carlos SánchezC

      [New plugin] Smart Math

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      13
      1 Votes
      13 Posts
      3k Views
      M
      @Carlos-Sánchez Just for my couriosity. How did you manage to integrate FreeBASIC with Notepad++?
    • donhoD

      Notepad++ release 8.9.9.1

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      28
      3 Votes
      28 Posts
      5k Views
      andrecool-68A
      @donho The portable version 8.9.9-8.9.9.1 of Notepad++ creates empty directories C:\Users\Uzzer\AppData\Roaming\Notepad++\plugins\config For example, my old portable version 8.8.5 of Notepad++ does not create such empty directories.
    • donhoD

      You've a lot of reasons to hate Notepad++

      Watching Ignoring Scheduled Pinned Locked Moved Boycott Notepad++
      93
      5 Votes
      93 Posts
      198k Views
      M
      How would you like a shortcut definition UI to be designed then?
    • musicpandaM

      authenticode check failed

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      409 Views
      D
      Thanks xomx, that explanation makes sense — the shortened path in AstroGrep is a good catch. It would be useful to know whether upgrading to 8.9.9.1 fixed it for you, musicpanda, since that would confirm the cause for anyone else hitting the same error after updating from 8.9.3. If the upgrade does not fix it, it is worth checking the full path set in AstroGrep as well, and making sure the file path is passed with quotes when it contains spaces. The warning itself is a safety check, so it is better to fix the path than to work around the check.