• Issues with the Preview HTML plugin

    Notepad++ & Plugin Development
    13
    0 Votes
    13 Posts
    465 Views
    rdipardoR
    @Robk-Blue said: Any suggestions? Usually the Notepad++ Debug Info dialog is the best place to start: [image: 1779147166405-npp-debug-info.png] Click Copy debug info to clipboard and share the details in a new post. Some plugin-specific things include: Is Microsoft Edge installed? Launch PowerShell or the Command Prompt and enter: reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" /v Location Or simply launch File Explorer and try to locate this folder: C:\Program Files (x86)\Microsoft\EdgeWebView\Application Is your config.xml file trying to relaunch the preview panel automatically when Notepad++ starts up? Go here for instructions on how to find out. If you have a GitHub account, please consider posting your findings to the issue tracker I mentioned before.
  • Notepad++ release 8.9.5

    Pinned Announcements
    15
    1 Votes
    15 Posts
    3k Views
    xomxX
    @donho Fixed, perfect! Tried both the 32-bit on x86 Win81 and the x64-bit on x64 Win11. Now the only thing, which is always incorrectly left after (both with 32- and 64-bit N++ version uninstallers), is the C:\Program Files\Notepad++\localization\kabyle.xml file.
  • Search++: A work in progress

    Notepad++ & Plugin Development
    93
    5 Votes
    93 Posts
    11k Views
    LachlanmaxL
    @guy038 I wasn’t familiar with these projects. Thank you for the tip-off, I have a lot to learn from these. Glad I asked your advice. We don’t know each other too well yet, but from your replies I get the feeling you have been coding for a while now… as a relative n00b I think it’s good to learn coding the nuts-and-bolt way, not just “vibe coding” like everyone is nowadays. (Even though I’m developing an AI plugin, so a bit of a contradiction. But I like to develop plugins that I would use personally, and I don’t use it to “vibe code”. Granted though that some might.) tl;dr Hard work pays off!
  • 0 Votes
    4 Posts
    402 Views
    LachlanmaxL
    @guy038 Just to say, I tried your solution in native N++ for kicks, and it worked! So kudos for an elegant idea. :)
  • Scripts to align text

    Notepad++ & Plugin Development
    5
    4 Votes
    5 Posts
    5k Views
    sound-fxS
    I’ve added an option to pad to the right side of the selected character. This preserves the character’s position and instead aligns the non-space text to the right of the character. The default pads to the left side, so the character itself gets aligned. A complementary set of scripts, align_text_right.py and align_text_right_1.py, use this new option. Here’s the complete set of scripts. align_text.py: #------------------------------------------------------------------------ # If the character specified in the current selection is a white space, # then prompt the user to enter the alignment character (or characters), # using this character as the initial default. #------------------------------------------------------------------------ default_align_char = ',' from enum import Enum class PaddingSide(Enum): LEFT = 0 RIGHT = 1 def align_selected_text(max_align_char_count = None, padding_side = PaddingSide.LEFT): """Insert padding into the lines in the selection, as needed, to align up to max_align_char_count instances of a specific character or string of characters The default is to align all instances of the specific character. At present, the alignment character is taken as the character at the top of the current selection. You can uncomment some code below to change this policy to instead take the alignment character from within the selection at whichever end has the cursor. Either way, if that character is white space, the user is prompted to type the character (or characters). If you really wish to align on a white space character, you can just click OK at the prompt. When prompted to type the alignment character, the user may enter a sequence of characters, e.g., "-->", in which case the alignment is on the instances of that entire character sequence. For example, if the user enters "-->" at the prompt, then instances of the "-" character get aligned only if they're followed immediately by the characters "->", while instances of, say, "-1" and "- " remain unaltered. If there is no current selection, then aligns all lines in the editor. If there is a current selection, then aligns only the lines that are at least partially included in the selection, and the selection is changed to the entire block of newly-padded lines. Parameters ---------- max_align_char_count : positive integer, optional The maximum number of instances to align of the specific character. For example, set to 1 to align only the first instance of the character on each line. The default is to align all instances of the specific character. padding_side : instance of PaddingSide, optional Indicates which side of the character gets the padding. The default is PaddingSide.LEFT, so the character itself gets aligned. Set to PaddingSide.RIGHT to preserve the character's position and instead align the non-space text to the right of the character. """ from Npp import editor #---------------------------------------------------------------------------- # For the alignment character, take the character just inside the bounds of # the selection block (at either the start or the end, as determined below). #---------------------------------------------------------------------------- editor.targetFromSelection() selected_text = editor.getTargetText() #---------------------------------------------------------------------------- # Use this code to get the align_char unconditionally from the start # of the selection. If there is no selection, use the character at the # current cursor position; if that is unavailable, fall through to the # prompt below by treating the alignment character as whitespace. #---------------------------------------------------------------------------- if selected_text: align_char = selected_text[0] else: current_pos = editor.getCurrentPos() align_char = editor.getTextRangeFull(current_pos, current_pos + 1) if not align_char: align_char = ' ' #---------------------------------------------------------------------------- # Optionally use this code to get the align_char from within the selection # at whichever end has the cursor. #---------------------------------------------------------------------------- # if selected_text: # (startByte, endByte) = editor.getUserCharSelection() # if startByte == editor.getCurrentPos(): # align_char = selected_text[0] # else: # align_char = selected_text[-1] # else: # current_pos = editor.getCurrentPos() # align_char = editor.getTextRangeFull(current_pos, current_pos + 1) # if not align_char: # align_char = ' ' # If the character from the selection seems implausible as the # align_char, then prompt the user for it. if align_char.isspace(): from Npp import notepad global default_align_char align_char = notepad.prompt('Align character:', 'Enter Alignment Character', default_align_char) if align_char is not None: default_align_char = align_char #---------------------------------------------------------------------------- #%% Get the lines of text within the selected alignment block #---------------------------------------------------------------------------- (startLine, endLine) = editor.getUserLineSelection() startPos = editor.positionFromLine(startLine) endPos = editor.getLineEndPosition(endLine) text_lines = editor.getTextRangeFull(startPos, endPos).splitlines(True) #---------------------------------------------------------------------------- # Remember whether there is a user-selected block, so we can restore a # corresponding selection after aligning the text. #---------------------------------------------------------------------------- restore_selection = editor.getSelectionStart() != editor.getSelectionEnd() #---------------------------------------------------------------------------- # Align all instances of align_char within the lines of text #---------------------------------------------------------------------------- if align_char is not None: # Enable the following to save the align_char, however it was determined, # to be the default_align_char when prompting for it next time. # default_align_char = align_char if max_align_char_count is None: align_char_count = max(line.count(align_char) for line in text_lines) else: align_char_count = max_align_char_count start = 0 for instance in range(align_char_count): # Set the target column using the index of the align_char, ignoring # immediately preceding space, or the length of the line align_char_cols = [line.find(align_char, start) for line in text_lines] # Only lines that contain this instance participate in this pass. # A failed find() returns -1, and using that as a slice index would # make lines without this instance incorrectly affect the target. lines_with_instance = [(line, col) for (line, col) in zip(text_lines, align_char_cols) if col >= 0] if not lines_with_instance: break if padding_side == PaddingSide.LEFT: # Align the alignment character itself, removing any spaces # immediately to its left before inserting the required padding. target_col = max(len(line[:col].rstrip()) for (line, col) in lines_with_instance) for (idx, line) in enumerate(text_lines): align_char_col = align_char_cols[idx] if align_char_col >= 0: text_lines[idx] = line[:align_char_col].rstrip().ljust(target_col) \ + line[align_char_col:] start = target_col + len(align_char) elif padding_side == PaddingSide.RIGHT: # Align the non-space text after the alignment character. # Preserve the alignment character itself, but # replace any existing spaces after it with the required # padding. suffix_starts = [] for (line, col) in lines_with_instance: suffix_start = col + len(align_char) while suffix_start < len(line) and line[suffix_start] == ' ': suffix_start += 1 suffix_starts.append(suffix_start) target_col = max(suffix_starts) for (idx, line) in enumerate(text_lines): align_char_col = align_char_cols[idx] if align_char_col >= 0: suffix_start = align_char_col + len(align_char) while suffix_start < len(line) and line[suffix_start] == ' ': suffix_start += 1 text_lines[idx] = line[:align_char_col + len(align_char)].ljust(target_col) \ + line[suffix_start:] start = target_col else: raise ValueError('Unsupported padding_side: {}'.format(padding_side)) editor.setTarget(startPos, endPos) editor.replaceTarget(''.join(text_lines)) if restore_selection: startPos = editor.positionFromLine(startLine) endPos = editor.getLineEndPosition(endLine) editor.setSelectionStart(startPos) editor.setSelectionEnd(endPos) if __name__ == '__main__': align_selected_text() align_text_1.py: from align_text import align_selected_text align_selected_text(max_align_char_count = 1) align_text_right.py: from align_text import align_selected_text, PaddingSide align_selected_text(padding_side = PaddingSide.RIGHT) align_text_right_1.py: from align_text import align_selected_text, PaddingSide align_selected_text(max_align_char_count = 1, padding_side = PaddingSide.RIGHT)
  • New displaying of the "Search Results" panel

    General Discussion
    1
    1
    0 Votes
    1 Posts
    77 Views
    No one has replied
  • v8.9.6 RC will be available in about 3 days

    Announcements
    1
    2 Votes
    1 Posts
    110 Views
    No one has replied
  • Find/replace

    Help wanted · · · – – – · · ·
    9
    0 Votes
    9 Posts
    343 Views
    guy038G
    Hello, @balancedcircular, @terry-r, @coises and All, I suppose that the following regex S/R should be close to what you want ! I consider the entire line because you may have other lines with attributes Name and/or Comments FIND (?-si)^(<RectangularPart Version=.+ Name=")\d\d\d (.+/.).+?(\d")(.+ Comments=").+(?=>) REPLACE $1$2$3$4$2$3 As @coises said, try this global replacement on a copy of your file ! If everything works as expected, I’ll explain you, next time, how all the regex syntax means ! Best Regards, guy038 I almost forgot the last line of your post. To simultaneously search for any of the three words Rafter, C.Tie and Web, simply use the regex (?-i)Rafter|C\.Tie|Web
  • 0 Votes
    3 Posts
    220 Views
    pnedevP
    @baberzaman , You can also check NppGTags plugin from Notepad++'s Plugin Manager (this is its project URL: https://github.com/pnedev/nppgtags) - it uses Global GTags to index your code-base and then you can look-up identifiers and do greps. P.S. You love Notepad++, “Boycott Notepad++” is probably not the proper place for your thread. It is more suitable for general discussion or plugins sections as a question and/or suggestion for Notepad++ improvement. BR
  • 0 Votes
    3 Posts
    323 Views
    pnedevP
    Hi @rwieber79 , @peterjones , I’m just seeing this issue, thank you Peter for pinging me. @rwieber79 , just as a side note - please write directly to https://github.com/pnedev/comparePlus/issues in the future if you encounbter problems with ComparePlus - this way I’ll be notified more quickly about the issue. As to the issue itself - please try setting your Notepad++ rendering mode to GDI for the moment. You can do that from Notepad++ Settings - MISC. section (there is a drop-down menu there selecting the rendering which is DirectWrite by default). Then after restarting Notepad++ try again your crashing compare and please write back here if crash is still present. I am in a middle of a large ComparePlus code portions rework and some time in the near future I will release a new version which should not have problems with DirectWrite rendering. BR
  • AI Plugin

    Notepad++ & Plugin Development
    3
    1 Votes
    3 Posts
    714 Views
    BlueSea KuoB
    @jw I suggest adding an option to select the AI module.
  • nppgzipfileviewer - improvements request

    Notepad++ & Plugin Development
    2
    0 Votes
    2 Posts
    198 Views
    PeterJonesP
    @arnaud-derette , I have never used that plugin. But when I went to their homepage (https://github.com/Pascal-Krenckel/NppGZipFileViewer), they say, “This plugin is deprecated, please switch to CompressedFileViewer.” Once an author deprecates a plugin, there won’t be support for requests. I have put in a request to ask that the author remove the deprecated plugin from the Plugins Admin list (and, if they want, to add the replacement plugin into the list). But you should try their replacement plugin. And if it doesn’t improve your experience, you can go to the CompressedFileViewer’s issue tracker (https://github.com/Pascal-Krenckel/CompressedFileViewer/issues), and make your request(s) there.
  • Hopefully Notepad++ can display correctly ...

    General Discussion
    7
    -3 Votes
    7 Posts
    677 Views
    Athen CarlosA
    @ioc2e3 said: ioc2e3 Apr 29, 2026, 4:16 PM Hopefully Notepad++ can display correctly … More types of language archives … notepad++ has been holding it down for like 20 years now. underrated.
  • Is a filename legal?

    General Discussion
    2
    1 Votes
    2 Posts
    195 Views
    guy038G
    Hi, All, I did additional tests, especially regarding characters allowed with or without quotes ! Although practically any character can be put within a file name when using the rename option of the Explorer, it happens that, under DOS, it is safer to surround the filename with double quotes when you insert most of the allowed symboles So, here is an updated version of my information part : Syntaxes / Chars ALWAYS forbidden : \x00-\x1F " * / : < > ? \ | \x7F : . at the END of file name : SPACE at the END of file name : ALL DOTS file name : PRN AUX NUL : COM1 COM2 com3 COM4 COM5 COM6 COM7 COM8 COM9 COM¹ COM² COM³ : com1 com2 com3 com4 com5 com6 com7 com8 com9 com¹ com² com³ : LPT1 LPT2 LPT3 LPT4 LPT5 lpt6 LPT7 LPT8 LPT9 LPT¹ LPT² LPT³ : lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lpt¹ lpt² lpt³ Chars allowed WITHIN double quotes : ! % & ' ( ) + , ; = [ ] ^ ` { } ~ : SPACE when at BEGINNING of file name Chars allowed WITHOUT double quotes : # $ - @ _ : . if NOT at END of file name : SPACE if NOT at BEGINNING or END of file name You’ll note that my regex, described in my previous post, allows most of the symbols, even without quotes, as they, generally, can be inserted when using the Explorer ! BR guy038
  • Notepad++ v8.9.5 Release Candidate

    Announcements
    4
    4 Votes
    4 Posts
    931 Views
    donhoD
    @MarkusBodensee Thank you for your heads up. The fix will come with v8.9.5 release tomorrow.
  • autoupdater and XMLDSig

    Security
    7
    0 Votes
    7 Posts
    744 Views
    S
    I have checked out the https://github.com/donho/xmlSigner project and it is what I needed. I have used that project to correctly pass the XML signing test. I have opened some issues with that project. Here is a quick summary of how the update process works. The wingup code first queries a website to determine if an update is required and the returned XML provides information to be used later. None of the information in the XML is used if it doesn’t pass the XML security check. After passing the security check the code looks for the update status and download location, assuming an update is required. After prompting the user to download the update and finishing the download, it checks the code signing of the installer. Assuming that the code signing is valid and the correct certificate, it starts the install. I will try to document all the customizations to the code from Notepad++, wingup and xmlSigner to make it work in my project so that future users have a place to start, but that will be after I am sure its all working correctly with the new security updates. Thank you @xomx for pointing me in the right direction.
  • Facilities to create PostScript hotkeys

    General Discussion
    13
    0 Votes
    13 Posts
    749 Views
    PeterJonesP
    Sorry! It is NOT that I refuse to help you. It is mostly I don’t know how… I asked for screenshots (a normal function of Windows, which I assumed you would know how to grab). I asked for the Debug Info (I told you what menu to go into to get it). You provided neither. Also, I thought telling you that NOTHING showed in " -> Configuration" was self evident and DIDN’T need a screen snapshot? The screenshot would have confirmed: 1) that there really was “nothing” there (maybe you and I have a different definition of “nothing”), 2) whether you had really selected “user scripts” or had selected “machine scripts”, and 3) that you were willing to follow instructions to try to get help. I’m happy to announce I’ve fixed it!!! Don’t ask me how but my WHOLE NP++ setup was weird!!! It seemed half in Program Files and half in AppData. That’s not weird. That’s how Notepad++ and PythonScript are intentionally set up. The FAQ footnote that I’ve begged you to read explains why there are the two different script locations. In fiddling around I copied the PythonScript directory from Program Files into AppData and TaDa! Everything fell into place… EVERYTHING WORKED like clockwork! You thus copied way too much. You could have copied just the scripts. Or you could have just clicked the “machine scripts” button in the dialog, like I told you to, and not had to copy any files. THANK YOU for your responses and help. Glad you’ve got it working.
  • 3 Votes
    1 Posts
    252 Views
    No one has replied
  • missing config.xml file?

    General Discussion
    3
    0 Votes
    3 Posts
    335 Views
    ModelsRUsM
    Thank you Peter. Makes perfect sense. Much appreciated!
  • 0 Votes
    9 Posts
    844 Views
    AZJIO AZJIOA
    @dz15mlru Disable automatic encoding recognition. For Windows-1251 encoded Russian, auto-recognition will always open as Macintosh. If you start editing files, you will have two encodings, or rather garbage from two encodings, which will be difficult to fix manually, since you will have to re-read all the texts (this is a module for spoiling files). When you disable automatic encoding assignment, you will only have ANSI, UTF-8, UTF-16. WindowsXP-7-8-10-11 it will always open the ANSI file correctly, in 1251 encoding, as this is the default encoding. The remaining UTF-8 and others will also open automatically correctly. You will get rid of the problem forever. The automatic text encoding recognition module is needed if you open files in Arabic in ANSI, but in reality you will never do this, since a Russian-speaking person has only Russian-language files on their computer. People who want to make the file available to all people on earth save the file in UTF-8 encoding and it will always open correctly for you. You don’t need automatic file recognition, as it’s only for local files that you’ll never get from someone else’s computer abroad. Отключи автоматической распознавание кодировки. Для русского языка в кодировке Windows-1251 автораспознавание всегда будет открываться как Macintosh. Если начать редактировать файлы, то у вас будет две кодировки, точнее мусор из двух кодировок, который будет трудно исправить вручную, так как вам придётся перечитать все тексты (это модуль для порчи файлов). Когда вы отключите автораспозначание кодировки, то у вас будет только ANSI, UTF-8, UTF-16. WindowsXP-7-8-10-11 всегда откроет файл ANSI правильно, в кодировке 1251, так как это кодировка по умолчанию. Остальные UTF-8 и прочие откроются также автоматически правильно. Вы навсегда избавитесь от проблемы. Модуль автоматического распознавания кодировки текста нужен если вы открываете файлы на арабском языке в ANSI, но в реальности вы никогда этого не сделаете, так как у русскоязычного человека на компьютере есть только русскоязычные файлы. Люди, которые хотят сделать файл доступным для всех людей на земле сохраняют файл в кодировке UTF-8 и он всегда откроется правильно у вас. Вам не нужно автоматическое распознавание файлов, так как оно только для локальных файлов, которые у вас никогда не появятся с чужого заграничного компьютера.