• Please Read This Before Posting

    Pinned Locked faq newbie
    1
    4 Votes
    1 Posts
    12k Views
    No one has replied
  • FORUM: Posting Queue

    Pinned
    10
    1
    12 Votes
    10 Posts
    14k Views
    Ivy_PearsonI
    Thanks for the update, Peter. Totally understand the need for a posting queue—spam is getting tricky these days. Hopefully, it won’t take long to get posts approved once you earn reputation!
  • Linked text to open other files into Notepad++

    29
    4 Votes
    29 Posts
    27k Views
    J
    Greetings, everyone! I recently discovered this post when I was looking for a way to bookmark the class line number at the top of the file and this helped me a lot. However, I wasn’t satisfied and I wanted to upgrade it to have those bookmarks / shortcut links in a side panel but I didn’t know how and if it was even possible to create a panel with PythonScript plugin. So I discovered this jN Notepad++ plugin that enables user to extend the Scintilla interface with JScript / Javascript wrapper and I came up with this with help of AI: (function () { // Removed trailing $ so \r\n line endings from view.lines.get(i).text never block a match var COMMENT_REGEX = /(?:\/\/|<#|#|\/\*|--)\s*(TODO|FIXME|BOOKMARK|SECTION):?\s*([^\r\n#*]*)/i; var dock = null; var listContainer = null; function jumpToLine(lineIndex) { var view = Editor.currentView; if (!view || lineIndex >= view.lines.count) return; var maxLine = view.lines.count - 1; var screenOffset = 35; view.line = 0; view.line = Math.min(maxLine, lineIndex + screenOffset); view.line = lineIndex; } function refreshBookmarks() { if (!listContainer || !dock) return; listContainer.innerHTML = ""; var view = Editor.currentView; if (!view) return; var count = view.lines.count; var found = 0; for (var i = 0; i < count; i++) { var lineText = view.lines.get(i).text; var match = COMMENT_REGEX.exec(lineText); if (match) { found++; var tag = match[1].toUpperCase(); var desc = (match[2] || "").replace(/</g, "<"); var item = dock.document.createElement("div"); item.className = "bookmark-item"; item.innerHTML = "<span class='tag'>[" + tag + "]</span> "+"<span class='line-num'>Line " + (i + 1) + "</span><br />"+"<span class='icon'></span> " + "<span class='desc'>" + desc + "</span>"; (function (targetLine) { item.onclick = function () { jumpToLine(targetLine); }; })(i); listContainer.appendChild(item); } } if (found === 0) { listContainer.innerHTML = "<div class='empty'>No special comments found.</div>"; } } function showSidebar() { if (dock) { dock.visible = true; refreshBookmarks(); return; } dock = Editor.createDockable({ name: "Comment Bookmarks", docking: "right", onbeforeclose: function () { dock.visible = false; return false; }, onclose: function () {} }); var doc = dock.document; doc.open(); doc.write( "<html><head><style>" + "body { font-family: Segoe UI, Tahoma, sans-serif; font-size: 12px; margin: 0; padding: 6px; background: #f5f5f5; }" + ".toolbar { margin-bottom: 6px; }" + "button { width: 100%; padding: 4px; cursor: pointer; }" + ".bookmark-item { padding: 5px 6px; margin-bottom: 4px; background: b; border: 1px solid #ddd; cursor: pointer; }" + ".bookmark-item:hover { background: #e6f2ff; border-color: #99caff; }" + ".line-num { color: #666; font-weight: bold; }" + ".tag { color: #0066cc; font-weight: bold; }" + ".empty { color: #888; font-style: italic; padding: 8px; }" + ".icon { display: inline-block; width: 12px; height: 12px; vertical-align: middle; margin-right: 4px; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFBSURBVChThVK/S8NAGH25RiimdBARQRAcHHTSUQpO/gVODv4XWgIWm6GpVgo1WHBwdhRRN1dHi0uWOiloqTa0wVC4/uJ6XuJFghF98PHd3ffe9x33TrFtm09qGgAuQhERQuzDI5n7vT6UluPwVCD4H5RSkGhPH4wxFPaOUC2dBuufIP60EGPOYehF1G88zLgrqJgnMdH3BC7I+WwBD9ce3mgTt/dJTHUysMyqaDSWLCGQGbs7ZVyca2B8FfOpJaS5iqc6wePdBoq5M8mKCBgbgA5ddIcM73QRc+kPdGgSXvsZbOBJVkRQOc5haxtQ2ZW4UgPtro1R7xIL6zXky1nJiggIIShZBaxtLmNWfUHTbWE6M8KBZQS1EIojfNAiPvivYugmVDKB/UMdiURCVr58iAn+QiB4bTR+dZrHvgrQoxSfR8eMDpy8I5cAAAAASUVORK5CYII=') no-repeat center center; color: #0066cc; font-size: 11px; margin: 0 2px; }" + "</style></head><body>" + "<div class='toolbar'><button id='refreshBtn'>Refresh List</button></div>" + "<div id='list'></div>" + "</body></html>" ); doc.close(); listContainer = doc.getElementById("list"); doc.getElementById("refreshBtn").onclick = refreshBookmarks; refreshBookmarks(); } function insertBookmarkAtCursor() { var view = Editor.currentView; if (!view) return; var path = (view.files && view.files[view.file]) ? view.files[view.file].toLowerCase() : ""; var prefix = /\.(ps1|psm1|psd1|py|sh|yml|yaml)$/.test(path) ? "# " : "// "; view.selection = prefix + "BOOKMARK: "; refreshBookmarks(); } var menu = Editor.addMenu("Comment Bookmarks"); menu.addItem({ text: "Show Comment Bookmarks", cmd: showSidebar }); menu.addItem({ text: "Insert Bookmark Comment at Cursor", cmd: insertBookmarkAtCursor }); // Use setTimeout (300ms) instead of addIdleHandler so Notepad++ finishes loading UI and tabs first System.setTimeout({ millis: 300, cmd: showSidebar }); Editor.setListener({ BUFFERACTIVATED: function () { if (dock && dock.visible) refreshBookmarks(); }, FILESAVED: function () { if (dock && dock.visible) refreshBookmarks(); } }); })(); This basically creates a side panel (Dockable) and traverses the document to find comment lines beginning with specific strings such as: • // BOOKMARK: name of bookmark • # SECTION: name of section • /* TODO: name of todo */ • – FIXME: name of fixme before #, //, /*, – you can write whatever you want because regex is searching for those characters + space and then matches whether KEYWORD + colon used after, Note: every subsequent space character between comment start character and KEYWORD don’t matter as long as KEYWORD is in same line. Same goes for the spaces between KEYWORD: and the name of the Shortcut. Here are some screenshots: [image: 1795537210575-1.png] [image: 1795537230312-2.png]
  • 0 Votes
    4 Posts
    315 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.
  • authenticode check failed

    3
    0 Votes
    3 Posts
    389 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.
  • Why do Notepad++ keep the "Move to recycle bin" delete prompt?

    5
    0 Votes
    5 Posts
    737 Views
    D
    That matches what I have seen as well — the prompt is not really a Notepad++ setting, it comes from Windows, so Notepad++ cannot turn it off on its own. One thing worth knowing before changing it: the Recycle Bin setting applies to every program, not just Notepad++, so turning off the confirmation dialog means Windows Explorer stops asking too. If you only want to skip the prompt once in a while, Shift+Delete deletes a file permanently without sending it to the Recycle Bin, though that is worth using carefully since there is no easy undo.
  • The Notepad++ website is blocked in Russia.

    6
    0 Votes
    6 Posts
    6k Views
    PeterJonesP
    @Андрей-Максимов said: Try to use CudaText if you’re not welcome here It’s not Notepad++ or the owners of the Notepad++ website that was doing the blocking. It was something that the user’s service provider (or someone else in the middle) was blocking. From the Notepad++ team’s perspective, all users are free to download and use Notepad++, no matter where their IP physically maps to. But Notepad++ cannot prevent an ISP (or some other entity) from putting up a blockade between their users and the Notepad++ website.
  • # colors lines comments when they should not be

    3
    0 Votes
    3 Posts
    326 Views
    D
    You are right about Windows INI files, and this is not something you did wrong in langs.xml. For INI files, Notepad++ uses the built in INI lexer, and that lexer treats both ; and # at the start of a line as a comment. That behavior is in the lexer itself, not in langs.xml, which is why you did not find # listed as a comment marker there. Windows itself only treats ; as a comment in INI files, so the coloring is misleading for your files, but it is expected Notepad++ behavior, not a mistake in your setup. For your own language definition, check two things separately. First, open Language, Define your language, select your language, then look at the Comment and Delimiter tab and make sure # is not listed as a comment line opener. Second, check that the file is actually using your language, not INI: the Language menu should show your language name when that file is active, and the file extension should be assigned to your language only. Listing # as an operator should not turn a line into a comment on its own, so if # lines are still colored as comments in your custom files, the INI lexer is the likely cause, because the file is being treated as INI. Lycan Thrope’s EnhanceAnyLexer suggestion is a good workaround for the INI case, because it lets you override the comment color for # lines so they look like normal text. For your custom language, removing # from any comment definition in the UDL, then saving and reopening the file, is the cleaner fix. If you test with a small file that only has one # line and one ; line, you can tell at once which lexer is coloring it.
  • examining updates

    2
    0 Votes
    2 Posts
    318 Views
    PeterJonesP
    @asapuntz said: can I access things in a different way It takes some effort, but usually the pull request that fixes an advisory includes that advisory’s ID in the message, so you can search the pull requests for each ID
  • 1 Votes
    20 Posts
    2k Views
    guy038G
    Hello, @coises, I confirm that, if I choose the GDI (most compatible) rendering mode instead of the DirectWrite (default), the spliting action seems to always occur after 78 letters P ! I verified this assumption with, both, the proportional Times New Roman font and the fixed width Consolas font BR guy038
  • 0 Votes
    8 Posts
    614 Views
    M
    @PeterJones said: Your words said “Distraction Free Mode” without “Fullscreen”. “Fullscreen” is the aspect of DFM that covers the full screen. That is true, but to be fair I’ve also immediately clarified what I meant by “Fullscreen” in the first message : ) I’m assuming operates in Fullscreen mode, meaning it tries to always stay on top Not being a programmer, I can only talk about Fullscreen and Borderless by their observed effects in videogames. From videogame options, Fullscreen and Borderless both cover the entire screen, the only difference is Fullscreen behave as “Always On Top” (almost always), and Borderless doesn’t. Thank you for the Macro, it’s much less hassle than having to run that script manually every time, and I really appreciate it ^_^
  • Anyone Here Use Notepad++ for Large Files?

    3
    0 Votes
    3 Posts
    395 Views
    S
    @Mark-Olson That’s really helpful, especially the point about a huge single-line file being slower than a much larger file with shorter lines. I hadn’t considered that line length could make such a big difference to Notepad++ performance. I’ll definitely take a look at the Large File Restriction setting and the HugeFiles plugin as well. Thanks for sharing all these details!
  • Mark lines with blue balls and jump between them

    16
    0 Votes
    16 Posts
    15k Views
    T
    hello, try to navigate: Search -> Bookmark -> Next bookmark <F2> tomas
  • Tab spacing copying from Notepad++ into WordPress

    10
    0 Votes
    10 Posts
    902 Views
    David Brigden52D
    Tabs v spaces As Peter said, the most important part is consistency. Mixing tabs and spaces together makes no one happy. I will throw out a couple arguments for tabs here: Indentation of code, markup language, et. cetera is meant to show the structure of whatever. Tabs are a logical, structural element. Spaces are physical. Different users may want different sizes of indentation. If i want 4 character indentation and my coworker wants 2, tabs can be set to show our preferred width. Seems for the most part that spaces are winning out though.
  • PHP Lang: Word vs Keyword

    3
    0 Votes
    3 Posts
    388 Views
    Laurie StearnL
    @PeterJones Good info on StyleID, thanks.
  • rename files

    4
    0 Votes
    4 Posts
    666 Views
    S
    Regex is definitely the way to go for this kind of filename cleanup in Notepad++. It’s great how a simple search-and-replace can handle a whole list of filenames at once instead of renaming each one manually. Just make sure to test it on a few files first to avoid any unexpected changes.
  • Windows list / Entry for the current tab not visible initially

    5
    2 Votes
    5 Posts
    876 Views
    fml2F
    For the reference: I’ve created https://github.com/notepad-plus-plus/notepad-plus-plus/issues/18554.
  • Cannot Update Plugins

    4
    0 Votes
    4 Posts
    764 Views
    PeterJonesP
    @steeve-wick , That’s almost a direct quote of what I said a month ago. Were you trying to add new information?
  • dark theme preference on main website doesn't work as expected.

    17
    2 Votes
    17 Posts
    2k Views
    PeterJonesP
    @Lycan-Thrope said: Did you make the change permanent No. I made an Issue, so Don can fix it. I don’t have write access to the main website. Update: Oh, I see, after I went through the approvals, that @myfancytextgenerator already guessed that mine was just an issue.
  • What are your favorite Notepad++ features for everyday coding?

    4
    0 Votes
    4 Posts
    476 Views
    PeterJonesP
    @T.I-Digital-Solutions said: I mainly use Notepad++ for working with HTML, checking page source, and making quick edits during SEO tasks, so I was curious about features that could make those jobs easier. With those specifics, then I’d say good plugins to try would be HTML Tag, Preview HTML, and XMLTools. UDL is not useful for HTML, because the HTML lexer that’s built into Notepad++ is better than anything that the simple User Defined Language system can handle. But if you also deal with the server configuration files (like .htaccess files), then the UDL Collection has a UDL available for Htaccess, for example.