• Request New Plugin

    7
    0 Votes
    7 Posts
    313 Views
    TroshinDVT

    Simplified version.
    Place this text in the ‘Notepad ++ \ plugins \ jN \ jN \ includes’ directory and this functionality will work for you on the selected text by pressing the ‘Ctrl + Shift + C’ hotkey.

    // trdm 2020-11-20 11:44:27 // вычисляет выделение в N++ как выражение с пом WSH javascript 'eval' // file: C:\_ProgramF\Notepad++\plugins\jN\jN\includes\trdmUtil.js // repo: https://github.com/trdm/jn-npp-scripts function evalSelection() { var selTextOrig = Editor.currentView.selection; if(selTextOrig.length == 0) { return; } var vRezult = 0; try { vRezult = eval(selTextOrig); } catch(e) { vRezult = ''; } if(!vRezult) { return; } else if(vRezult == NaN) { return; } Editor.currentView.selection = selTextOrig + " = "+vRezult; } var myEvalSelectionItem = { text: "Eval selection \tCtrl+Shift+C", ctrl: true, shift: true, alt: false, key: 0x43, cmd: evalSelection }; if (!jN.scriptsMenu){ var scriptsMenu = Editor.addMenu("jN.scripts"); jN.scriptsMenu = scriptsMenu; } scriptsMenu = jN.scriptsMenu; addHotKey(myEvalSelectionItem); scriptsMenu.addItem(myEvalSelectionItem);

    Demonstration:
    alt text

  • PLUGINS PACK

    2
    0 Votes
    2 Posts
    167 Views
    PeterJonesP

    @Asif-Mute ,

    That’s not the way that Notepad++ plugins work. Just install the ones you want.

  • Chocolatey Package for Notepadplusplus removes all plugins

    2
    0 Votes
    2 Posts
    412 Views
    Harald Sømnes HanssenH

    I think I found out what the original problem was

    Lots of people had 7.5.7 installed when I upgraded their version up to 7.9.1
    I had not remembered there was an discussion around 7.6.2. where to put the plugins, so when I bumped up the version to 7.9.1, plugins were removed.

    I tested removing notepadplusplus and installing it again, the extra plugins I used, persisted after the upgrade.

  • Bug in regex replace use?

    3
    0 Votes
    3 Posts
    157 Views
    guy038G

    Hello, @eyal-plotkin, and All,

    Well, I think that you should download the last N++ release v7.9.1 !

    https://notepad-plus-plus.org/downloads/v7.9.1/

    A major regex enhancement fixes some bugs about the look-behind structures and some look-behind assertions as \A and \b :

    Refer to point 3 of the change.log file :

    3. Fix RegEx look behind operations and \A and \b and \z (Fix #713, #1870, #2216, #2360, #9004, #4855).

    Best Regards,

    guy038

  • TextFX 0.27 x86 and x64 available

    8
    0 Votes
    8 Posts
    5k Views
    k3tonanK

    @rainman74 said in TextFX 0.27 x86 and x64 available:

    Here I provide TextFX 0.27 in builds for x86 and x64.

    HTML Tidy is also available in both versions.

    Download

    Have fun ;-)

    Can we get an updated download link?

    Thanks

  • NppExec v0.6.1 has been released!

    3
    6 Votes
    3 Posts
    287 Views
    Vitaliy DovganV

    @Alan-Kilborn
    It’s not a secret :) My activity on GitHub includes NppExec and two plugins for AkelPad text editor. AkelPad is unbelievably customazible: it can be a simple SDI editor similar to the standard Notepad; it can be an MDI text editor without advanced features; it can be an advanced MDI code editor with syntax highlighting, additional plugins and scripts. Finally, it is written in C, and it is small and fast.

    Also, due to project needs several years ago I’ve bought Sublime Text. It is fast (not as fast as AkelPad, but anyway) and has some outstanding features for developers (including “indexing” that allows IntelliSense-like experience). On the other hand, I was shocked how hardcore and unfriendly Sublime Text is when it comes to customization. For example, I went through several circles of hell before I managed to change the background color of selected text. (While you need just a few seconds to do the same in Notepad++ or AkelPad!) Another example: Sublime Text’s workspace files can be highly customized by the user, on the one hand, but, on the other hand, it is achieved only by manual editing of these files - and the editor does not even try to suggest you what you can type in this file and what you can not! Finally, Sublime Text is updated much less frequently comparing to Notepad++ and I have not felt any benefit from being a registered user (who have bought the license): all my questions in the forums had been answered by experienced Sublime Text users (similarly to what we have in Notepad++ forums) rather than by developers’ representatives, and I had not received any official answer from the developers regarding two features I proposed (unsimilarly to Notepad++ forums) as if I was just ignored by them.

  • New Plugin for REST API calls

    4
    1 Votes
    4 Posts
    4k 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
    1k 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
    2k 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
    1k 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
    174 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
    355 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
    1k 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
    12k 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
    327 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
    275 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
    203 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
    15k 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