• FORUM: Posting Queue

    Pinned
    10
    12 Votes
    10 Posts
    10k 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!

  • Please Read This Before Posting

    Pinned Locked
    1
    4 Votes
    1 Posts
    10k Views
    No one has replied
  • Facilities to create PostScript hotkeys

    7
    0 Votes
    7 Posts
    62 Views
    PeterJonesP

    @Louis-Windsor said in Facilities to create PostScript hotkeys:

    @PeterJones

    Sorry - POSTscript was a typo. I meant PythonScript…

    Response to your response from the AI

    Your AI is wrong. Please do not rely on it anymore. I cannot argue the points with the AI, as it is not capable of thought, but I will respond to one point:

    ❌ There is NO WAY to assign a hotkey to a PythonScript 3.x script.

    I literally used hotkeys in PythonScript 3.0.24 on near daily basis. It is obviously possible, as I do it.

    Based on its response, I am assuming you were giving it an argumentative prompt, and/or it was prompted by my use of “nonsense” to get defensive. That is unfortunate, as it is not helping you get the information you need.

    I hope I can explain to you how to do it, without using the FAQ – though I will personally be followinng the steps from the FAQ.

    At this point, please stop feeding my responses to the AI, and getting it to argue with me. Try the steps I outline, and show all of the same screenshots I do to confirm that you are getting different results when you follow the same instructions. Without your actual results, neither I nor anyone else can help you. (And obviously, the AI just wants to encourage you to fight with me, which is not helpful for anybody.)

    I will reword the instructions that I already wrote in the FAQ just to help you. This is how important it is to me to help you understand how to do this.

    I am testing these steps PythonScript 3.0.25, and will be following my own instructions that I am typing to you while I take the screenshots. These replicate the steps in the FAQ.

    My assumptions are:

    you already have PythonScript 3.0.x installed – hopefully 3.0.25, but the interface hasn’t changed since before PythonScript 2.0, so the screenshots should still match what you have. you already have created the script, and it shows up in Plugins > Python Script > Scripts

    These are the instructions I am following from the FAQ:
    810bd3a1-767c-4853-8478-30ecef125868-image.png

    The instructions, with screenshots:

    First, here is confirmation that I’m running PythonScript 3.0.25, based on a screenshot of PythonScript ABOUT box:
    15d647cb-89f8-4e83-b4dd-2c509abe64a2-image.png
    please show your ABOUT box if following these instructions do not work for you

    This shows I have already created the ProvidedScript.py, and it is in my scripts menu, but not in the main PythonScript menu.
    07dbf7c3-354c-4b8b-b93e-b7688e02174d-image.png
    please show a screenshot of your Scripts submenu if these instructions do not work for you

    The FAQ instructions tell me to go Plugins >Python Script > Configuration…: I follow those instructions, and confirm the menu entry exists:
    a8e1b405-8a69-4cef-bdbd-51b624feca6d-image.png

    When I click that menu entry, I see the following dialog:
    55116936-786f-4600-a6d7-ac2fdd2695cc-image.png
    please show a screenshot of your Python Script Configuration dialog if these instructions do not work for you

    The FAQ instructions tell me to pick User Scripts next. That is already selected, as shown in screenshot for step 4

    The instructions tell me to select ProvidedScript.py. I click that, so it’s now got a highlight/selection bubble around it:
    5557ddbd-3de3-48e8-9431-b9f767e01bdc-image.png

    The instructions tell me to “Click the left Add to add the script to the Menu items table”. In this dialog, I see two Add buttons, so in the next step, I will click the left one: here is a screenshot with that button pointed to with a big green arrow. Do not click the one with the red arrow:
    2694be83-2f6f-4e6c-b3eb-e9113cfbc38f-image.png

    I follow the instructions to click the left Add button. Now the dialog has changed, to include my script in the Menu items list:
    29a0a588-c9c5-41e7-8e54-31c7ed0609f8-image.png

    The instructions next say to click OK. I won’t supply another screenshot, as that button is easily findable.

    The FAQ instructions tell me to “Exit Notepad++ completely and restart the application”. You have to do this in order for Notepad++ to be able to assign the keyboard shortcut. If you skip this step, the remainder of my instructions will not work. So I exit and restart Notepad++ (no screenshots)

    The FAQ next says, “Plugins > Python Script will now list ProvidedScript”: here is a screenshot showing that is true for me:
    5cfb3078-27cc-44c4-90b3-f1dc1c8e1024-image.png

    The FAQ says to use Notepad++'s shorcut mapper using Settings > Shortcut Mapper. First, here is a screenshot of the menu, which includes that entry:
    410d5795-3467-481b-b6a4-6d08e833aebf-image.png

    When I click that entry, I get the following dialog:
    10554875-a304-4b81-abc1-9e9a7002447c-image.png

    As the FAQ says, I next “select the Plugin commands tab”. In that dialog, I see “Plugin commands” at the top, so I click it, and see:
    888bff07-7469-4297-9f46-5d9deca66fc9-image.png

    As the FAQ says, I next “Filter = ProvidedScript”. I see the Filter box in the dialog, so I type ProvidedScript there, and now see
    6bce1beb-3275-486a-8b57-0d00ecfa3d58-image.png

    Cool, I can see that ProvidedScript is available to the Shortcut Mapper with PythonScript 3.0.25 at this point. Making good progress.

    If following these instructions is not working for you, please change the Filter to PythonScript, and then show a screenshot of your Shortcut Mapper dialog

    The FAQ says, “Click on ProvidedScript in the list”, so I click on it. and can see that it’s been highlighted as active:
    63578c9d-38ae-40e2-927e-68aff5198ae4-image.png

    The FAQ instructs me to Modify, so I click that button, and a new dialog pops up:
    6080b175-299c-4230-97e7-fe9c855b3477-image.png

    The FAQ next says, “and set the shortcut as desired”, so I pick Ctrl+Alt+Shift+P:
    86f26c35-2605-44b4-b3d2-2480faceb334-image.png
    if following these instructions is not working for you, please share the screenshot here, if you made it this far

    The FAQ tells me that OK is next, so I click that, and it goes back to the full Shortcut Mapper dialog, which now shows that Ctrl+Alt+Shift+P is the shorcut:
    2d0f869e-5cd5-4dd7-a622-8c98429d17e1-image.png

    At this point, the FAQ tells me that I can Close the dialog, so I do.

    To check, I look at the Plugins > PythonScript menu again, and see that it now lists the shortcut next to ProvidedScript. Cool:
    fec726a2-1e55-49a7-93ad-bef9224411a8-image.png

    Finally, I do Ctrl+Alt+Shift+P, and it runs my script.

    This was all with PythonScript 3.0.25. But it will work with any of the recent 3.0.x versions. And, in fact, it would even work with PythonScript 2.1, because those dialogs are essentially unchanged between the versions.

    At this point, I have confirmed that PythonScript 3.0.25 allows me to use Notepad++'s Shortcut Mapper to set a keyboard shortcut (“hotkey”) for a script in PythonScript.

    Follow these instructions, and it should work for you. If you have difficulty, provide the screenshots requested.

    Don’t bother feeding these into the AI. It won’t help you. Just try the instructions, and if they don’t work, provide the data so we can help you figure out why it’s not working.

    update: Since I know the instructions work, I am guessing that you probably missed step 10 – exiting Notepad++ completely and restarting the application. Without that step, Shortcut Mapper will not see the script. Given the implications of your original post, this seems like the most likely thing to have gone wrong

  • missing config.xml file?

    3
    0 Votes
    3 Posts
    127 Views
    ModelsRUsM

    Thank you Peter. Makes perfect sense. Much appreciated!

  • BUG: N++ does not keep in UTF8 unsaved open files

    9
    0 Votes
    9 Posts
    728 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 и он всегда откроется правильно у вас. Вам не нужно автоматическое распознавание файлов, так как оно только для локальных файлов, которые у вас никогда не появятся с чужого заграничного компьютера.

  • Hopefully Notepad++ can display correctly ...

    6
    -3 Votes
    6 Posts
    312 Views
    CoisesC

    @Samir-Sumantlal-Shah said in Hopefully Notepad++ can display correctly ...:

    GujaratiMT

    Searching suggests that “Gujarati MT” is a Apple system font that is not available elsewhere.

    Are you by any chance using the new MacOS port of Notepad++? That port is not maintained or endorsed by the creator of Notepad++. You would have to raise issues with it in its own repository. We’re not going have a clue here.

  • New feature: Allow additional line on each search results

    5
    0 Votes
    5 Posts
    236 Views
    CoisesC

    @Alan-Kilborn said in New feature: Allow additional line on each search results:

    @Coises

    I can’t tell if you’ve considered this, but one way to do it would be in conjunction with hiding lines. You could hide lines that don’t meet the criterion of -M through +N, where M would be a user-chosen number of lines before the hit, and N a user-selected count of lines after the search match.

    At first thought, I believe that would be significantly easier to implement than doing it in the search results window. As a plus, it (or a close approximation) could even be available after the search with something like an “expand visible blocks” command.

    The downside is that Show commands only work on the current document; you can’t show in all open documents (and it wouldn’t even make sense for find in files, whenever I finally get that done). At present, my use of hidden lines (using Scintilla’s function directly) and Notepad++’s way of doing it (keeping its own internal table, inaccessible to plugins, of what ranges are hidden) are at odds with one another, which causes any changes my plugin has made to hidden lines to be lost when any other tab is switched into the view. Thus far, I have not been able to devise any solution to this.

  • Feature request

    3
    0 Votes
    3 Posts
    117 Views
    PeterJonesP

    @Shobansky ,

    See my longer answer to you here.

    I’m not sure why you started a new Topic when you were already participating in a Topic about exactly the same thing, and when there was a Topic created 5 days ago that was essentially the same thing. (Also, naming a Topic “feature request” is not helpful to people looking through the titles of the recent posts, because it tells them nothing about the contents of said feature request. Titles should be meaningful if you want meaningful discussion.)

    Also, since I’m not sure you’ve seen it, our new feature FAQ explains that, while we can talk about ideas all we want in this Community of Notepad++ users, it isn’t an official Feature Request until you follow the instructions in that FAQ to post the Feature Request to the official Issues tracker for the project.

  • Incorporating Prettier and/or js-beautify

    3
    0 Votes
    3 Posts
    1k Views
    PeterJonesP

    @Shobansky ,

    A few months after the original post was made, this FAQ was created, which explains how to use pork2sausage plugin (or the run menu, or the NppExec plugin) to transform text. And since things like Prettier or js-beautify exist, it makes more sense to pass formatting to an external utility that’s customized for a specific programming language, to make users of that programming language happy – rather than relying on limiting the formatting to whatever rules that one developer adds to the editor. (Given the arguments people have over the auto-indentation, and how the developer hasn’t been able to keep everyone happy even on that “simple” aspect of formatting, trying to get a generic formatter to the point that everyone is happy is virtually impossible.)

    I don’t understand why it doesn’t have some formatting capability like other editors…

    Every editor has strengths that it focuses its feature development on. Notepad++'s strengths are in the ease and availablilty of plugins and running external applications… so plugins specific to the language (like HTML Tidy) or plugins that launch external programs (like pork2sausage) are the way that Notepad++ made it easy to get formatting customized the way you want it, rather than restricting you to the ability of the N++ developer to support and implement.

    And the developer’s philosophy is that, unless it’s something that he wants to put his own stamp on, if it’s already been implemented well in a plugin or can be easily run through the run-menu/pork2sausage/nppexec, then he doesn’t want to waste his effort on doing something mediocre built-in when something good-to-great already exists. As someone with a full time job completely unrelated to Notepad++, he wants to focus his limited development time to things that he likes, he wants, or that he can add value to.

    Moreover, in the modern realm, things are moving toward LSP-based solutions – so if the languages you program in have LSP servers available, then (as was mentioned in this very similar question a few days ago) you can use one of the LSP plugins (the plugin by Kered or @Ekopalypse’s LSP client plugin) – so if your language’s LSP server has the code formatting feature, the LSP plugin you choose should be able to activate that.

  • About ( Ctrl + F ) ...

    2
    -2 Votes
    2 Posts
    112 Views
    PeterJonesP

    @ioc2e3 ,

    This is a copy of your GitHub issue. But I don’t think anyone has any clue what you actually want or are asking about.

    Could you please clarify what you’re asking about? Is it something that only happens if you use that specific localization, or does it happen in English as well?

  • Notepad++ 8.9.4 (x86)EXE Upgrade Leaves Duplicate ARP Entry

    Moved
    3
    0 Votes
    3 Posts
    309 Views
  • 8.9.4 installation shows error for AppX call

    2
    0 Votes
    2 Posts
    171 Views
    xomxX

    @Bodenseematze said in 8.9.4 installation shows error for AppX call:

    I don’t know the exact message

    Probably(?) the same as in the https://community.notepad-plus-plus.org/post/105358

  • Very small problem

    5
    0 Votes
    5 Posts
    189 Views
    U

    @Uwo222777
    Of course, the program itself should return the encoding to its original form, but… it doesn’t do this.

  • Enhancement of the COLUMN EDITOR feature

    5
    0 Votes
    5 Posts
    278 Views
    guy038G

    Hi, @alan-kilborn and All,

    Of course, I could use your method to achieve my goal but that is just the reason why I wanted this enhancement which should avoid any further operation !!

    BTW, this idea occured to me while I was writing this other post :

    https://community.notepad-plus-plus.org/topic/27511/surprising-regular-expression

    In the meanwhile, I’ve found out a nice work-around to realize that goal ! Let’s imagine that you want to do a list of 743 empty lines exactly ( I chose that number as it’s a prime number ). Then :

    Open a new tab Within N++

    Hit the Enter key just once

    Open the Replace dialog ( Ctrl + H )

    Uncheck all box options

    Check the Wrap around option ONLY

    Select the Regular expression search mode

    FIND \R

    REPLACE $0$0

    Click 10 times on the Replace All button

    => You should get a total of 1,025 lines ( Note that, after each replacement N, the number of lines increases to the value 2 × N + 1 )

    The trick is to repeat the process up to the first number which is greater than 743 !

    Now, open the Search > Go to... option ( Ctrl + G )

    Search for the line 744 ( so 743 + 1 )

    Then, select to the very end of file with the Ctrl + Shift + End shortcut

    And finally, hit the Delete key

    => It should remain the expected 743 lines !

    I readily admit that all the different tasks of my work-around do not take long. However, I still think that a new field Total insertion number, in the Column Editor dialog, filled with the value 743, would have been more elegant and straightforward !

    Best Regards,

    guy038

  • 0 Votes
    2 Posts
    192 Views
    EkopalypseE

    @Rex-Theodore
    You can always use the Run menu to call up the formatters with the current buffer.
    However, since you mentioned that you use Python, you can use the PythonScript plugin and
    trigger an action whenever you receive a NOTIFICATION.FILESAVED.
    If you want more features, you might want to check out Kereds or my LSP client for Notepad++.
    However, this means that the languages you use must have an LSP server.

  • Cannot open text files in Adminitrative mode from network shares in Win11

    7
    0 Votes
    7 Posts
    401 Views
    xomxX

    @Olyfant22

    There really are substantial differences in between the Win10 & Win11 in this area. I know about 2: SMB signing enforcement in 24H2+ and stricter token isolation (the later one should be solvable by that mentioned “EnableLinkedConnections”)

  • The Column count of Zenkaku chr. is 1?

    2
    0 Votes
    2 Posts
    125 Views
    CoisesC

    @Hiroki-H1974 said in The Column count of Zenkaku chr. is 1?:

    So, the position is not the same even if Col: count is same because the line contains some Zenkaku chrs.

    I don’t know Japanese; please forgive me if I’ve missed the point in some way.

    The column (“col:”) in the status bar is just a count of characters from the beginning of the line, starting at one. (That’s not even always what you might expect; combining characters that form a single visible character are still counted separately.)

    Aside from a few things like cursor positioning, line wrapping and selection with the mouse, Notepad++ (like the Scintilla control it uses for editing) doesn’t concern itself with the physical space occupied by characters. In English, we can use a proportional font, and a line of twelve characters will show the next “column” as 13, whether they are IIIIIIIIIIII or WWWWWWWWWWWW.

    So (though I haven’t attempted to test it), regardless of font, I would expect that there would be no recognition of the difference between half-width and full-width characters.

  • Virtual Key Codes Update

    4
    1 Votes
    4 Posts
    298 Views
    pbarneyP

    @PeterJones Thanks for the quick update to the manual! Maintaining technical documentation across versions is a major undertaking when there’s an integrated development team within major corporations; I can’t imagine how herculean that job must be when you’re not side-by-side with a lone developer, so thank you for the excellent work on it. I really do appreciate your speedy response and update.

    I tried to post the second part of my list yesterday, but I was delayed by the “time between posts” counter, and unfortunately had to leave before it reset.

    However, you might want to double check your list against the FAQ, to let us know if the FAQ is missing any.

    I’ll go ahead and do that. Thanks again!

  • Terminal window in a N++ tab

    8
    0 Votes
    8 Posts
    546 Views
    PeterJonesP

    @arnaud-derette said in Terminal window in a N++ tab:

    i think i get it : It does not handle correctly 4K screen.

    That does not surprise me. Notepad++ is still not great for high-DPI environments, and it’s been taking a long time to finish some of the last-remaining high-DPI issues. And if the main app, with lots of contributors, still has issues, then it should come as no surprise that the plugins, which usually only have one developer (if they remain interested), whose skillset usually focuses on the feature that their plugin implements, rather than on the generics of all the edge cases of modern win32 coding. (At least, I know that’s true for me on my plugin(s).)

    I don’t have a High-DPI environment, so I don’t know and can’t test for you, but maybe the NppExec plugin handles high-DPI better than NppConsole does (whether the original, or the intermediate fork)

  • Preview value color RGB, HEX, HSL.

    21
    0 Votes
    21 Posts
    13k Views
    PeterJonesP

    @tauniaxd ,

    I have added the ability to do rgba(0,127,127,0.05)-type colors to the on-demand script at
    https://github.com/pryrt/nppStuff/blob/main/pythonScripts/nppCommunity/21xxx/21044-ColorizeHtmlCssColors.py

    1e6ece19-b4de-4475-b379-0649d96b2d4f-image.png

    If you prefer full underline, then change lines 24 and 26 of the script to use INDICATORSTYLE.PLAIN instead of INDICATORSTYLE.DASH

    aa370073-5db8-4431-b80e-7ffc21b3c61c-image.png