• New Plugin for REST API calls

    4
    1 Votes
    4 Posts
    5k Views
    eljefe7000E

    @PeterJones ,

    I have created a new repository called RestApiToText, and will start a separate thread with the new repository. Thanks for your help!

  • Hex-Editor plugin failed to handle files other than UTF8 encoding

    5
    0 Votes
    5 Posts
    2k Views
    PeterJonesP

    @Alan-Kilborn said in Hex-Editor plugin failed to handle files other than UTF8 encoding:

    @PeterJones said in Hex-Editor plugin failed to handle files other than UTF8 encoding:

    And I believe that the Scintilla editor object stores the text in memory as UTF8

    Is this always true, though?

    Apparently not.

    Using a file with your ➤ character (from the other post) in it, I started playing around. UTF8, UCS2-LE-BOM, UCS2-BE-BOM all show up differently (and with the number of bytes and endianness that I would expect), but if you choose one of the 8-bit character set “encodings”, it always uses the UTF-8 byte sequence for the ➤ character.

    So, it appears the Hex Editor works as expected for any of the UTF8/UCS2 encodings, but not with the character set. Given that character sets are treated differently in the code (there aren’t many NPPM_ or SCI_ messages dealing with character sets, compared to more with the Unicode encodings), it appears that character set is mostly used during read-from-disk or write-to-disk, and not during the internal manipulation.

    why does Scintilla have/need the SCI_SETCODEPAGE and SCI_GETCODEPAGE functions?

    Not sure, really. No matter what character set or encoding I choose for a given editor tab, editor.getCodePage() always returns 65001. As far as I can tell, the SCI_GETCODEPAGE only ever returns 65001. Even when I change the settings so that New documents are in something like OEM 855, which should be codepage 855, it returns 65001. Even when I go to cmd.exe, chcp 855, then launch a new instance of Notepad++ from that cmd.exe environment, it returns 65001. Even if I editor.setCodePage(855), a subsequent editor.getCodePage() returns 65001.

    Oh, from Scintilla SCI_GETCODEPAGE docs, “Code page can be set to 65001 (UTF-8), 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK), 949 (Korean Unified Hangul Code), 950 (Traditional Chinese Big5), or 1361 (Korean Johab).” So it’s there for choosing either UTF-8 or one of the Asian codepages. The docs also mentioned that 0 is valid (for disabling multibyte support). When I set 0, then it reads back 0; similarly for the 6 explicit values quoted.
    But if I choose a charset like Shift+JIS, it does not change the SCI_GETCODEPAGE readback, so the codepage and charset are separate entities.

    But back to the higher level:

    Basically, it appears that if it’s a real Unicode encoding (UTF8, UCS2), HexEditor will use that byte representation. But if it’s a “character set”, then it shows UTF8 bytes for non-ASCII characters, no matter how it happens to be encoded on disk. I am still guessing this is based on how Scintilla handles the bytes internally.

  • Tia ; Is there a pluggin to colorize .js files ?

    18
    0 Votes
    18 Posts
    3k Views
    PeterJonesP

    @vmars-vernon said in Tia ; Is there a pluggin to colorize .js files ?:

    I don’t really know what this is

    There’s a FAQ in this Forum on that: https://community.notepad-plus-plus.org/topic/15740/faq-desk-what-is-appdata

    Do people not check FAQ of a forum anymore?

  • unable to download HexEditor Plugin from the plugins admin

    7
    1 Votes
    7 Posts
    2k Views
    andrecool-68A

    @Bastien-Haemmerli Better to use a full-fledged Hex Editor,
    free HxD https://mh-nexus.de/en/hxd/

  • pluggin to colorize .js files ? Still Need Help .

    2
    -1 Votes
    2 Posts
    373 Views
    PeterJonesP

    @vmars-vernon
    Be patient. Not all responses come within 1 minute, 1 hour, or even 1 day. Sometimes, you have to wait until someone who happens to have the knowledge you seek has time to log onto the forum.

    Other readers:
    Do not reply here. Reply in the original topic

  • Where to store custom XML plugins on Windows 10?

    10
    0 Votes
    10 Posts
    791 Views
    Justin NoorJ

    @Ekopalypse Great thanks.

  • PHP AutoComplete Plugin 64Bit

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @MadTomT ,

    From what I can tell, not yet.

    You might want to poke at https://github.com/StanDog/npp-phpautocompletion/issues/6

  • NppFTP Unable to connect

    3
    0 Votes
    3 Posts
    2k Views
    PeterJonesP

    @Дмитрий-Суричев said in NppFTP Unable to connect:

    provide debug information
    and where to get it? I would like to see it myself.

    Go to the ? menu in Notepad++, and it has a Debug Info entry.

    When I tried with the ftp://91.122.30.115/ URL (by the way, it would have been nice if your “working filezilla” example had actually been to the same site as your “not-working NppFTP” example) – FileZilla gave

    Status: Connecting to 91.122.30.115:21... Status: Connection established, waiting for welcome message... Status: Insecure server, it does not support FTP over TLS. Status: Server does not support non-ASCII characters. Status: Logged in Status: Retrieving directory listing of "/"... Status: Directory listing of "/" successful

    With no username or password, using FTP, NppFTP gave

    [NppFTP] Everything initialized -> TYPE I Connecting -> Quit 220 Welcome to Pineforest.info FTP service. -> USER 331 Please specify the password. -> PASS *HIDDEN* 503 Login with USER first. Unable to connect Disconnected

    When I changed the settings to give an anonymous username, and ask for a dummy password

    87dadb31-fcf1-4c38-aa81-a064a9c121d9-image.png

    When I ran that connection I typed anonymous, it gave:

    -> TYPE I Connecting -> Quit 220 Welcome to Pineforest.info FTP service. -> USER anonymous 331 Please specify the password. -> PASS *HIDDEN* 230 Login successful. -> TYPE A 200 Switching to ASCII mode. -> MODE S 200 Mode set to S. -> STRU F 200 Structure set to F. -> PWD 257 "/" is the current directory Connected -> CWD / 250 Directory successfully changed. -> PASV 227 Entering Passive Mode (91,122,30,115,135,92) -> LIST 150 Here comes the directory listing. 226 Directory send OK.

    So NppFTP connected just fine to ftp://91.122.30.115/

    ? > Debug Info:

    Notepad++ v7.9 (64-bit) Build time : Sep 22 2020 - 03:19:04 Path : C:\usr\local\apps\notepad++\notepad++.exe Admin mode : OFF Local Conf mode : ON OS Name : Windows 10 Enterprise (64-bit) OS Version : 1903 OS Build : 18362.1016 Current ANSI codepage : 1252 Plugins : ComparePlugin.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll NppUISpy.dll PreviewHTML.dll PythonScript.dll QuickText.dll TagLEET.dll XMLTools.dll

    Plugins > NppFTP > About
    3e9ee8d8-d892-46b7-9ceb-029b2f0f2236-image.png

    So, it works for me.

  • How to write a plugin

    13
    0 Votes
    13 Posts
    16k Views
    TroshinDVT

    @Michael-Vincent said in How to write a plugin:

    I use Notepad++ completion Settings => Preferences => Auto-Completion. It’s not ideal and only works on the local file - it’s not Intelli-Sense, but suffices for most my simple programming needs. For code navigation, I use a modified TagLEET.

    This is sometimes not enough, maybe.

  • 0 Votes
    3 Posts
    597 Views
    Romain BOUCHAUD-LEDUCR

    @dail Thanks, I will take a look at it when I have the time.

  • Autosave plugin fails to install

    4
  • Context menu for plugin icons on the toolbar!

    3
    2 Votes
    3 Posts
    614 Views
    KnIfERK

    Also applies to the plugin’s toolbar!

    Harmony !!!

    image (2).png

  • NppExec v0.6 RC4 has been released!

    2
    6 Votes
    2 Posts
    473 Views
    dinkumoilD

    @Vitaliy-Dovgan said in NppExec v0.6 RC4 has been released!:

    There’s even a syntax highlighting for NppExec’s scripts

    Moreover, there is also a function list extension for NppExec scripts:
    https://gist.github.com/dinkumoil/ef6acc8601cb0ef139d418c87c2b828f

    @Vitaliy-Dovgan Thank you for this new release!

  • How to debug plugins during development?

    18
    1 Votes
    18 Posts
    16k Views
    KnIfERK
    Output to Dialog TCHAR buffer[100]={0}; wsprintf(buffer,TEXT("position=%d"), _oldproc); ::MessageBox(NULL, buffer, TEXT(""), MB_OK); Output to the status bar TCHAR buffer[256]={0}; wsprintf(buffer,TEXT("IdealRows=%d"), IdealRows); ::SendMessage(_pMainWindow->getHParent(), NPPM_SETSTATUSBAR, STATUSBAR_DOC_TYPE, (LPARAM)buffer); Create Unit Tests
    See examples in the TextFx plugin : https://github.com/HQJaTu/NPPTextFX/blob/VS2017-x64/Tests/scintilla_simu.cpp
  • Notification for command state changes

    3
    0 Votes
    3 Posts
    638 Views
    moon6969M

    I had a quick poke through NPP source… the main messageProc call (via _pluginsManager.relayNppMessages) is after the main “process message” Switch in NPPBigSwitch… but only for a few messages with “break”.

    I don’t think the TB_CHECKBUTTON messages make it to the Big Switch though since it has the same 0x402 value as NPPM_INTERNAL_CMDLIST_MODIFIED already present there.

    I’ll dig further if/when I get the chance!

  • Show TaskList option not working for Tasklist Plugin

    2
    0 Votes
    2 Posts
    6k Views
    Makwana PrahladM

    Hello,@junaid-ahmad-khan

    Please follow this steps,To Show TaskList option not working for Tasklist Plugin

    Step 1: How To Install This Notepad++ Todo List Plugin

    You can install this plugin from within Notepad++. Steps are, Notepad++ Menu Bar –> Plugins –> Plugin Manager –> Show Plugin Manager. In the “Available” section of the Plugin Manager, you
    can find this plugin with name “Task List”. Click the check box next to it
    and then click on Install button.
    Step 2:- How To Use This Notepad++ Task Todo List Plugin

    Notepad++. Steps are, go to Notepad++ Menu Bar –> Plugins –> Task List –> Show Task List. A Task List Navigation bar will be added on the right side of Notepad++.

    Step 3:-
    The syntax of the TODO task line is “TODO: task name” “TODO:” is the keyword, and “task name” is the name of the task. If “TODO:” is misspelled, the task will not be listed in Navigation Bar.

    I hope this information will be useful for you.
    Thank you.

  • icon (disk) on non active tab

    3
    0 Votes
    3 Posts
    925 Views
    Alan KilbornA

    So, here’s a procedure for “hacking” Notepad++ in order to get better-looking and easier-to-differentiate tab bar icons.

    First, get what is needed, and put everything together in a temporary folder somewhere:

    Obtain “Resource Hacker” from http://angusj.com/resourcehacker/
    I chose the ZIP install, but whatever your pleasure.
    Really what you need in this step is ResourceHacker.exe

    Get some replacement icons, by downloading:
    http://www.famfamfam.com/lab/icons/silk/famfamfam_silk_icons_v013.zip
    Extract these files only: accept.png, lock.png, pencil.png

    Use an online conversion tool to convert all 3 of the .png files to .ico files
    One that I found simple to use was: https://icoconvert.com/
    Name the resulting .ico files this way: accept.ico, lock.ico, pencil.ico

    Also add to this collection of files a copy of your usual notepad++.exe file.

    Next, and also in the same folder, create hack_npp_icons.txt with the following content:

    [FILENAMES] Open=notepad++.exe Save=notepad++_hacked_icons.exe Log=con [COMMANDS] -modify accept.ico,ICONGROUP,501,1033 -modify pencil.ico,ICONGROUP,502,1033 -modify lock.ico,ICONGROUP,503,1033

    Now, obtain a CMD.exe window in your temporary folder (not going to do a lot of hand-holding here) and run the following command:

    ResourceHacker.exe -script hack_npp_icons.txt

    If all goes well, you should end up with no error messages and a new file called notepad++_hacked_icons.exe in your folder.

    Copy the hacked exe back to the folder you copied your original notepad++.exe from.

    Now test-run the hacked exe (after closing any running instance of N++ of course).

    It should start and any tabs on the tab bar should now have the alternative icons:

    A “pencil” icon for modified but unsaved files:
    5c301d8a-99b2-440e-84ad-b9d76b406775-image.png

    A “green checkbutton” icon for saved files:
    4833d989-8372-4dde-b990-7d042906abda-image.png

    A “lock” icon for readonly files:
    265eebb0-4f30-4853-8520-fea87322d22d-image.png

  • Python Plugin Development

    6
    1 Votes
    6 Posts
    1k Views
  • Be ready for upcoming NppExec v0.6 RC4!

    2
    5 Votes
    2 Posts
    404 Views
    Michael VincentM

    @Vitaliy-Dovgan

    That is great news! Not that I think anything is missing in NppExec, but happy to see it is still actively supported. Thanks for a plugin I use everytime Notepad++ is open.

    Cheers.

  • Editor right-click, outside current text selection, lose this selection

    35
    0 Votes
    35 Posts
    14k Views
    frying-panF

    @Alan-Kilborn

    ok i see
    [https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8564](link url)
    ‘Keep selection when right-click outside of selection’ has been added, or will be added to the next NPP version (as an option).

    So I will remove this specific feature from my
    NotepadPP-PythonScript-Mouse_Select_Gesture script
    once I have updated my NPP and tested the native option.