• Read This First

    Pinned Locked
    1
    5 Votes
    1 Posts
    5k Views
    No one has replied
  • New API to fix eventual regression regarding SCN_MODIFIED for some plugins

    Pinned
    32
    2 Votes
    32 Posts
    23k Views
    ThosRTannerT

    Just a quick question - when will the plugintemplate repo be updated to include the new message?

    Thanks

  • XBrackets Lite v2.0 has been released!

    4
    3 Votes
    4 Posts
    2k Views
    Vitalii DovganV

    XBrackets Lite v2.0.3

    Glory to Ukraine! Glory to the heroes! fixed: CXBracketsLogic::OnCharPress was truncating a multi-byte character to a single-byte one, thus incorrectly treating e.g. 0x1D5B as 0x5B which is ‘[’.

    https://github.com/d0vgan/npp-XBracketsLite/releases/tag/XBrackets_v203

  • possible to create a openfile dialog under jn-npp-plugin ?

    4
    0 Votes
    4 Posts
    53 Views
    PeterJonesP

    @PeterJones said in possible to create a openfile dialog under jn-npp-plugin ?:

    Or the plugin has a wiki , so that documentation might help you with your issue.

    For example, this page in its wiki describes how to call win32 api functions from the plugin. Using that, and the topic that @Alan-Kilborn linked, where @Ekopalypse showed how to wrap that same win32 api dialog using PythonScript plugin, combing the two ideas might allow you to do the same wrapping in jn-npp-plugin.

  • Columns++ display anomaly

    13
    0 Votes
    13 Posts
    1k Views
    CoisesC

    @Laurie-Stearn said in Columns++ display anomaly:

    Out of interest, getting similar behaviour in a UDL when selecting Arial as font as opposed to Consolas:

    <WordsStyle name="COMMENTS" fgColor="008000" bgColor="000000" colorStyle="1" fontName="Arial" fontStyle="2" nesting="0" />

    As before type a long line of text which overflows the wrap limit thus

    texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext

    Then insert before it the opening comment tag:

    /*

    Solid pink line appears below the long line which prevents any cursor movement below with down-arrow.

    Replacing Arial with Consolas for example doesn’t repro.
    Some rare irreproducible glitchiness with pink lines may occur in other situations by just typing the slash instead of the asterisk.

    Edit: Just realised this is for a plugin not installed - the issue seems to be with N++ itself. Sorry.

    When it happened with my plugin (Columns++) the cause turned out to be a wrapped line getting shorter (due to tab layout changing), so that it needed one less wraps. The solution involved temporarily disabling Scintilla’s line cache: something that can cause slow processing in large files with word wrap on. The problem doesn’t happen when editing itself makes the line shorter; it happens when something done after the editing is complete (like recalculating tab widths, or changing styles) causes the line to get shorter.

    My guess is that in this case, the text wraps to n lines after editing, before the new styling is applied; then, when styling is applied, the text only requires n-1 lines for wrapping, and the leftover line is magenta-marked. That marking is a Scintilla “feature” to show that something went wrong. (Why it doesn’t just correct the wrapping instead, I don’t know. Scintilla is open source, but it’s still pretty much a black box to me.)

    The practical fix is probably to avoid specifying different fonts (or font variations with differing widths) for different styles if you expect to use them with word wrap. For performance reasons, turning off the Scintilla line-wrapping cache would not be something Notepad++ would do.

  • Compose for Notepad++ (another experimental plugin)

    15
    7 Votes
    15 Posts
    516 Views
    PeterJonesP

    @Coises ,

    I think with v1.1, it’s a reasonable compromise between what would be ideal and what is practical. Thank you.

  • Vertical Sidebar for Open Documents in Notepad++

    2
    0 Votes
    2 Posts
    95 Views
    PeterJonesP

    View > Document List

    https://npp-user-manual.org/docs/views/#built-in-panels

    update: once someone replies, DO NOT DELETE YOUR POST. It has been restored.

  • Unicode Normalize: A simple plugin

    4
    5 Votes
    4 Posts
    301 Views
    CoisesC

    @guy038

    I implemented your suggestions in version 1.1.

    Hex values for the Unicode code points are shown if there are no more than eight code points in any of the normalized forms.

  • 2 Minor Requests

    2
    0 Votes
    2 Posts
    91 Views
    PeterJonesP

    @JCB said in 2 Minor Requests:

    It would be nice to have a cancel option in the Create File dialog when trying to open NP++ with a nonexistent file.

    In what way is the “no” button not sufficient for your needs?

    a60caeed-04ac-48d1-b18d-186caea59100-image.png

    Also (since Windows is not real wonderful about restoring all my drive mappings on startup) if a file in the recently used list is on one of those drives, please do not remove it from the recently used list (or give me the option to keep it). Thanks.

    As described in User Manual > Preferences > Recent Files History:
    1340b2c4-4dbb-4fa0-9d9a-64a0ff6077bd-image.png

    Checkmark that option. Then, when Notepad++ launches, it will not remove missing files from the Recent Files History list.

  • JSON String Escape / Unescape

    12
    0 Votes
    12 Posts
    20k Views
    Alexander VerbitskyA

    @Ilia-Nenashev said in JSON String Escape / Unescape:

    Such possibility I have found only in https://github.com/RolandTaverner/npp-json-escape-unescape-plugin but there is some risk of installing compiled plugin from outside of community.

    Well, I’m (the author of the npp-json-escape-unescape-plugin) not that far outside the community. Also, I’ve finally fixed the plugin solution so anyone can build it from source (see the instructions in the README).

  • NppExec v0.8.10 has been released!

    1
    5 Votes
    1 Posts
    145 Views
    No one has replied
  • ViSimulator Not supported anymore?

    10
    0 Votes
    10 Posts
    8k Views
    Dave HouserD

    @PeterJones Thanks for the reply been waiting for something like this for years! Just set up the latest 1.2 version (released yesterday coincidentally) . NppVim is wonderful! It does everything ViSimulator did, it also fixes a few minor issues I have delt with in ViSimulator and added features.

    Fixes:

    Works in newest versions of Npp + 64 bit. Using v $ actually selects to the end of the line now. ViSimulator went to end selection minus one character at the end. Can use Ctrl+f to NP++ find in regular or edit mode. In ViSimulator I needed enter edit mode to use Ctrl+f to find.

    Added feature:

    Can use : <integer> to jump to line numbers now, had to use Ctrl+g to use Npp’s one becuase ViSimulator did not support it. Can now use inputrc commands I used in the past like c i w, and y i w to cut or yank a whole word while in the middle of it

    This is great, I’m really glad this exists now!

  • 0 Votes
    3 Posts
    236 Views
    Revs DeeR

    @PeterJones
    Thank you, that was useful :) I’ve updated shortcuts.xml so Alt+F6 now ignores selected text.

    <Command name="Open new instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) -nosession -multiInst</Command> <Command name="Open selected file path in new instance" Ctrl="no" Alt="no" Shift="no" Key="">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command>

    da188c0f-2184-4898-ae3a-b65a5ba09cf8-image.png

    I hadn’t taken a moment before posting to find what Alt+F6 was labelled as. I’ve been using this command via the keyboard shortcut for a long time and not via the Run menu.

    For basic users, I think it could be useful to have this as an out of the box option e.g. File > New Window (Ctrl+Shift+N).

    Thanks again!

  • New plugin: VirtualFolders

    3
    1 Votes
    3 Posts
    198 Views
    Fatih CoşkunF

    @PeterJones,

    As I see it you can only add actual files from the disk to the projects in Project Panel. In VirtualFolders “files” can be just buffers you created in Notepad++. They don’t have to be saved. Most of my buffers are not saved . They are just notes.

    Also you are right new files (saved or unsaved) automatically added in this panel. When you close it, it is automatically removed. Just like in Document List.

  • Looking for Scintilla examples for a Notepad++ plugin

    3
    0 Votes
    3 Posts
    294 Views
    CoisesC

    @John-HUANG-0 said in Looking for Scintilla examples for a Notepad++ plugin:

    I want to write a Notepad++ plugin that can change the font color and background color of certain specific text.

    Depending on your needs, the first thing you should consider is whether you really need a plugin, or whether a User Defined Language could do what you want.

    However, using a method like this:

    SendMessage(hSci, SCI_STYLESETFORE, SCE_USER1, RGB(255, 0, 0));

    is not very efficient, especially when dealing with very large files.

    When making many calls to Scintilla, it is best to use Direct Access. Even better, if you are writing in C++, is to use the ScintillaCall interface. Annoyingly, that interface does not seem to be documented anywhere. You can read the relevant section in the help for my Visual Studio template and, if it makes sense, either use that template or look at the code (start here) to see how it’s done.

    I asked ChatGPT about this, and it suggested that using Lexilla could be much more efficient. I found the Lexilla source code here:
    https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/scintilla

    I have never attempted to write a lexer, so I can’t give advice there, except to say that unless you are trying to implement full syntax highlighting for a computer language that doesn’t already have a lexer, it’s probably not the way to go. The efficiency problem can be solved by using the direct access interface or ScintillaCall.

  • 4 Votes
    68 Posts
    25k Views
    PeterJonesP

    Notepad++ v8.8.6 Plugins Admin links to CollectionInterface v1.2.0

    comes with Dark Mode support and bulk-mode download (actually from v1.1, which I mentioned over here) v1.2.0 has better handling of -settingsDir and Cloud Directory. (It was implementing the -settingsDir handling which lead to the new v8.8.6 plugin message NPPM_GETNPPSETTINGSDIRPATH , which my plugin uses when Notepad++ version is new enough (though it does have a workaround that works even if you manually install it on an older N++).)

    CollectionInterface v1.3.0 is now available for manual installation:

    When downloading functionList defitions(s) (either on the FunctionList tab, or in bulk along with the UDL), the plugin will ask if you want to update the overrideMap.xml, which allows the functionList to be fully installed through the automatic process, so that functionList will immediately start working, without requiring you to manually update overrideMap.xml to link to the definition. I wasn’t fast enough with this feature to get it in the v8.8.6 Plugins Admin, so it’s manual installation only, for now.
  • Columns++ version 1.3: All Unicode, all the time

    2
    4 Votes
    2 Posts
    212 Views
    guy038G

    Hello, @coises and All,

    I’ve just tried your last ColumnsPlusPlus v1.3 release and indeed, the search is now considered as a true Unicode search, whatever the individual encoding of each file !

    Let’s consider this simple UTF-8 text :

    This ‟ is a † very • small ‰ text ‱ for › test 201F 2020 2022 2030 2031 203A in Unicode UTF-8 enoding

    And this ANSI text :

    This ? is a † very • small ‰ text ? for › test ? 0086 0095 0089 ? 009B in Windows-1252 encoding

    IMPORTANT Don’t forget, when this second text is opened in N++, to run the Encoding > Convert to ANSI option, first !

    Now, we can create the following table, which recapitulates the Non-ASCII characters used in my examples :

    •--------•-----------------•-----------------• | | Windows-1252 | Unicode | | •--------•--------•--------•--------• | Char | Dec | Hex | Dec | Hex | •--------•--------•--------•--------•--------• | ‟ | ? | ? | 8223 | 201F | | | | | | | | † | 0134 | 0086 | 8224 | 2020 | | | | | | | | • | 0149 | 0095 | 8226 | 2022 | | | | | | | | ‰ | 0137 | 0089 | 8240 | 2030 | | | | | | | | ‱ | ? | ? | 8241 | 2031 | | | | | | | | › | 0155 | 009B | 8250 | 203A | •--------•--------•--------•--------•--------•

    In Notepad++ :

    Within an ANSI file, the regexes [†-‰] or [\x86-\x89] would only find the characters and but not the whose Win-1252 code ( \x95 ) is after \x89

    Within an UTF8 file, the regexes [†-‰] or [\x{2020}-\x{2030}] would find the characters and and also the whose Unicode code-point is between 2020 and 2030

    In Columns++ :

    Within an ANSI file, the regexes [†-‰] or [\x{2020}-\x{2030}] would find the characters and and also the whose Unicode code-point is between 2020 and 2030

    Within an UTF8 file, the regexes [†-‰] or [\x{2020}-\x{2030}] would find the characters and and also the whose Unicode code-point is between 2020 and 2030

    Note that using the range [†-›] within an ANSI file, a N++ search of the char would have been successful as its code-point ( 2022 ) lies within the 2020 and 203A range !

    Now, @coises, I cannot test easily the CJK behaviour of your new search engine as it’s obvious that I do not a default CJK code-page, needed for such a study ! However, I do not see why your new search behavior couln’t be applied to any kind of Unicode chars ;-)

    Best Regards,

    guy038

  • Add additional command line parameter for plugins

    2
    1 Votes
    2 Posts
    2k Views
    Vitalii DovganV

    There is one more thing that requires an explicit mentioning in the documentation:

    When exactly NPPN_CMDLINEPLUGINMSG is sent to plugins? In particular, is it sent before or after NPPN_READY? (Currently it is sent before NPPN_READY. But will it be so in the future?)
  • 3 Votes
    1 Posts
    296 Views
    No one has replied
  • SCI_GETCODEPAGE is NOT always either 0 or 65001

    3
    4 Votes
    3 Posts
    3k Views
    CoisesC

    I wrote in SCI_GETCODEPAGE is NOT always either 0 or 65001:

    When I did a test by changing my system default character set to Japanese, I started a new file, set it to ANSI, and pasted in some Japanese text. SCI_GETCODEPAGE was 932. I saved it that way. When I opened it again, the encoding was set to Shift-JIS — not ANSI — and SCI_GETCODEPAGE was 65001.

    For future reference:

    This only happens if Settings | Preferences | MISC | Autodetect character encoding is checked. When it is not checked, the file opens, as expected, as ANSI (SCI_GETCODEPAGE returns 932).