• List box hover text for Style Configurator?

    5
    5 Votes
    5 Posts
    255 Views
    mpheathM

    @PeterJones keeping the 2 Listboxes might be OK as well since I have mocked it recently.

    NppListToCombo2.png

    Left side and center same as my previous post. The right side displays 2 listboxes with 8 items per list being visible. Either of the 2 alternatives appear wider as can be seen in the image.

    Here is the AutoIt3 sources if anyone wants to play with them. Just need the AutoIt3 interpreter which can get from downloading the Zip file and extract AutoIt3.exe or AutoIt3_x64.exe.

    ; about: With 1 ComboBox and 1 Listbox. Global Const $CBS_DROPDOWNLIST = 0x3 Global Const $GUI_EVENT_CLOSE = -3 Global Const $WS_VSCROLL = 0x00200000 Global Const $WS_CAPTION = 0x00C00000 GUICreate('Style Configurator', 750, 405, -1, -1, $WS_CAPTION) GUICtrlCreateLabel('Select theme:', 67, 15) GUICtrlCreateCombo('Default (stylers.xml)', 142, 15, 160, Default, $CBS_DROPDOWNLIST) GUICtrlCreateGroup('', 10, 45, 250, 345) GUICtrlCreateLabel('Language:', 20, 60) GUICtrlCreateCombo('Global Styles', 20, 85, 230, Default, $CBS_DROPDOWNLIST) GUICtrlSetData(Default, 'ActionScript|ADA|ASN.1|ASP') GUICtrlCreateLabel('Style:', 20, 120) GUICtrlCreateList('Default Style', 20, 145, 230, 180, $WS_VSCROLL) GUICtrlSetData(Default, 'Indent guideline style|Brace highlight style|Bad brace colour' & _ '|Current line background|Selected text colour|Multi-selected text color' & _ '|Caret colour|Multi-edit carets color|Edge colour|Line number margin' & _ '|Bookmark margin|Change History margin|Change History modified' & _ '|Change History revert modified|Change History revert origin' & _ '|Change History saved|Fold|Fold active' & _ '|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20') $idExit = GUICtrlCreateButton('Exit', 650, 365, 80) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idExit Exit EndSwitch WEnd ; about: With 2 Listboxes Global Const $CBS_DROPDOWNLIST = 0x3 Global Const $GUI_EVENT_CLOSE = -3 Global Const $WS_VSCROLL = 0x00200000 Global Const $WS_CAPTION = 0x00C00000 GUICreate('Style Configurator', 750, 405, -1, -1, $WS_CAPTION) GUICtrlCreateLabel('Select theme:', 67, 15) GUICtrlCreateCombo('Default (stylers.xml)', 142, 15, 160, Default, $CBS_DROPDOWNLIST) GUICtrlCreateGroup('', 10, 45, 250, 345) GUICtrlCreateLabel('Language:', 20, 60) GUICtrlCreateList('Global Styles', 20, 80, 230, 120, $WS_VSCROLL) GUICtrlSetData(Default, 'ActionScript|ADA|ASN.1|ASP|Assembly|AutoIt|AviSynth' & _ '|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20') GUICtrlCreateLabel('Style:', 20, 195) GUICtrlCreateList('Default Style', 20, 215, 230, 120, $WS_VSCROLL) GUICtrlSetData(Default, 'Indent guideline style|Brace highlight style|Bad brace colour' & _ '|Current line background|Selected text colour|Multi-selected text color' & _ '|Caret colour|Multi-edit carets color|Edge colour|Line number margin' & _ '|Bookmark margin|Change History margin|Change History modified' & _ '|Change History revert modified|Change History revert origin' & _ '|Change History saved|Fold|Fold active' & _ '|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20') $idExit = GUICtrlCreateButton('Exit', 650, 365, 80) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idExit Exit EndSwitch WEnd

    I didn’t type the full list of items as it is just mocking the Style Configurator Dialog for display purposes.

  • ftp profiles gone a lot

    3
    0 Votes
    3 Posts
    209 Views
    Afik GilboaA

    @PeterJones

    option 1 is most likely, but one time it happened when i restarted notepad++ himself
    i will backup the file you told me

  • [New plugin] CNC Gcode backplot/simulation plugin

    12
    6 Votes
    12 Posts
    5k Views
    S

    Hi NCalu,

    i like your plugin and have it on my watchlist. Want to try it out, but didn’t had the time yet.

    Personaly i work only with Sinumerik Controllers. Looking at your G-Code, it looks more like Fanuc or Mitsubishi Style G-Code programing. However the preview is a really nice feature.

    Can the plugin handle unexpected commands, which are possible only on certain controllers e.g. Sinumerik G-Codes, Functions, Cycles e.g like Cycle61(,…,) for face milling and so on?

  • Also keep tabs of unavailable files on next start

    4
    0 Votes
    4 Posts
    187 Views
    D

    @PeterJones Hi Peter, thanks for pointing me to this feature, did’t know it existed! Indeed probably a good candidate to have this enabled by default, doesn;t hurt.

  • "} else {" as a new section

    2
    0 Votes
    2 Posts
    144 Views
    PeterJonesP

    @Bert-Nieuwenampsen said in "} else {" as a new section:

    Can I adjust this somewhere in Notepad++?

    Notepad++ uses the Lexilla IP by Scintilla for syntax highlighting and folding. Apparently, the PowerShell lexer has a property called fold.at.else, but Notepad++ doesn’t currently set that option. If Notepad++ were to set that true on PowerShell documents (by setting that property in setPowerShellLexer()), then it would allow folding at } else { for PowerShell.

    So if someone (you) were to follow the instructions in our Feature Request FAQ, and make an official request, it could be turned on, or a preference could be added to allow the user to toggle it. Then, if the developer thought it was a good idea, it might eventually be added to Notepad++.

    Until that happens, you could use the PythonScript plugin to toggle that setting:

    bb4ef35e-f36b-4ac3-a885-50a5637b20ea-image.png
    vs
    fa016149-1177-4813-a3aa-c9961a2295f5-image.png

    To be able to automatically do that, you could edit (or create) your user startup.py to include

    from Npp import editor, notepad, LANGTYPE, NOTIFICATION def cb_pwshFoldAtElse(args): if notepad.getCurrentLang() == LANGTYPE.POWERSHELL: editor.setProperty("fold.at.else", 1) notepad.callback(cb_pwshFoldAtElse, [NOTIFICATION.BUFFERACTIVATED])

    (For more on PythonScript and the user startup.py, and the need to set ATSTARTUP instead of LAZY for my instructions to work, see our FAQ: How to install and run a script in PythonScript)

  • Prevent file loading

    10
    0 Votes
    10 Posts
    2k Views
    EkopalypseE

    @Alan-Kilborn said in Prevent file loading:

    I don’t believe NPPM_DOOPEN or WM_OPEN do the job, though.

    I doubt that too

    @clach04
    To “really” not open a file before it is read, Npp must support this internally, which is not yet the case.

  • Code Beautifier 1.0 (PythonScript)

    25
    2 Votes
    25 Posts
    8k Views
    Hugues DuvernoisH

    @Khundian-Twitch
    Hello, can you please put your script back please? I need to create one for a very specific langage of an IBM tool and your work can really help me.

    Thank you,
    Regards

  • autocomplete with clickable web link

    4
    0 Votes
    4 Posts
    190 Views
    S

    Thank you guys for the quick answers

  • 0 Votes
    17 Posts
    466 Views
    CyReX1986C

    @Alan-Kilborn said in æøå ÆØÅ Python in Notepad++ with NppExec Norwegian, Icelandic, Danish and the Faroe Islands:

    You can write in the NPPExec Console window?? I didn’t even know that!

    Yeah this was me having an “omg, that’s cool” / “I am an idiot” moment ^^ It might have been lost in translation though and can easily be misinterpreted as something else. If so i am sorry.

    @Alan-Kilborn said in æøå ÆØÅ Python in Notepad++ with NppExec Norwegian, Icelandic, Danish and the Faroe Islands:

    Do something (intro). Literally the first way to do something says “using NppExec’s Console allows you to enter some command and execute it by pressing Enter”.

    English is not my first language so that pretty much went straight over my head. I interpreted this as “making a .txt or .py file (or any file used for the console)” and writing the command line there and sending it to the console. Not as pressing the mouse inside the console and using it as a “command prompt/terminal” since that is not what i set out to do in the first place.

    @Alan-Kilborn said in æøå ÆØÅ Python in Notepad++ with NppExec Norwegian, Icelandic, Danish and the Faroe Islands:

    There used to be a common sense thing that when you’re starting to use something new, you do at least a glance-through of its manual. I’m probably old school, though.

    If one is doing something they want to learn and set out to do so then ofc read the manual! But for my use, nah i see that as an waste of time in my matter. Yet i did go into the link and glance over it. Remember i made this post to help my future self and hopefully others, not be schooled in how to use npp/python. All though i do appreciate all the help that has been given! And i am sure others will too!

    @Alan-Kilborn said in æøå ÆØÅ Python in Notepad++ with NppExec Norwegian, Icelandic, Danish and the Faroe Islands:

    It also pays to be a bit humble when others are trying to help; makes the whole process smoother.

    I believe I’ve been more then “a bit” humble in this thread. But yeah you are right, this thread did not go very smoothly.

  • Folder as Workspace shows the same file multiple times

    2
    0 Votes
    2 Posts
    120 Views
    PeterJonesP

    @Simon-Hottentot ,

    The officially-reported issue #15831 appears to be showing the same symptom. You may want to add your description to that issue so that the Developer will see it (as per our FAQ, the Developer doesn’t look here for bug reports), because it seems to add more information that #15831 doesn’t yet include.

  • Translate plugin

    21
    0 Votes
    21 Posts
    17k Views
    rdipardoR

    @HEPBHbIU_KAPJICOH said in Translate plugin:

    Is it possible to add Ukrainian language?

    Looks like it already does include Ukrainian: https://sourceforge.net/p/npptranslate/code/HEAD/tree/nppTranslateCS/MyMemoryTranslateEngine.cs#l102

    There’s also a slightly updated 64-bit version on GitHub with all the same languages: https://github.com/databird/npptranslate64/releases

  • [New plugin] Columns++

    69
    9 Votes
    69 Posts
    16k Views
    Pete RunP

    @Coises said in [New plugin] Columns++:

    @Pete-Run said in [New plugin] Columns++:

    So my request would be an option to “Elastically Ignore” lines with no tabs.

    Columns++ | Profile… | Do not allow text following the last tab on a line to span columns. should not be checked for the example given.

    AhHa, I am not sure that I understand “Do not allow text following the last tab on a line to span columns” but that works niceley, thanks.

    I still don’t quite understand your use case. What is it you are trying to do that would be easier if elastic tabstop positions were shown only for selected lines?

    I only occasionally use NPP for NPP shortcuts.xml, some Lua, AHK etc. I was brought up on IBM mainframe early Text editors and JCL etc, so I am at home with text editors so am happy to use it for text manipulation, especially when Ms Word macros are lacking.

    My main gripe with tabs in textual situations is that they can “mess up/misalign” when copied between applications, hence my desire to sometimes use monospace fonts with spaces rather than tabs and of course in tables a word processor, but many situations do not afford tables.

    So, thanks again for your Columns++ and Elastic Tabs which helps keep my text aligned in different scenarios.

  • [New plugin] PlantUML Viewer

    40
    7 Votes
    40 Posts
    18k Views
    Fruchtzwerg94F

    For all of you who are interested in: A new version 1.8.0.12 is released and available.

    PlantUML version updated to 1.2024.8 Removed dependency to PlantUml.Net library Removed dependency to Fizzler library Added generated file information to support built in %filename() and %dirpath() preprocessor functions Fixed diagram background not set e.g. if white

    You can download it at the 1.8.0.12 release or just wait to the next Notepad++ update to get it with the plugin manager.

  • HexPat...Is this fancy XML?

    2
    0 Votes
    2 Posts
    188 Views
    PeterJonesP

    @TedTester ,

    HexPat…Is this fancy XML?
    The last one has a file extension of “hexpat”.

    Never heard of a standard filetype that uses that extension.

    A quick internet search tells me that maybe it’s a file that goes with the ImHex application, and here is an example – it doesn’t look at all like XML to me, so if that’s the format, the answer to your title is “no, it is not fancy XML”. It looks a lot more like a C source-code file (and, from my research, appears to be a config-style file for the ImHex open-source hex-editor app, which it uses to help it interpret specific binary formats).

    But I cannot know if that filetype is the same as the .hexpat file you found, because you were rather nebulous (other than you thought it looked like fancy XML, which makes me doubt it, because to my mind, the example I found and what you described are two very different formats)

    If I were looking at that kind of .hexpat file, I would choose the C lexer: Settings > Style Configurator > Language: C, add hexpat to the User ext.: box, then every time you load a *.hexpat file, it would choose the C lexer for syntax highlighting.

    If it really looks more like <tagName attrib="value"><nested id="12345">text</nested><single setting="false" /></tagName>, then I would add that value in the User ext.: box for XML instead of C.

    Edit: https://hackage.haskell.org/package/hexpat-0.12

    That link is about a library for the Haskell programming language which is used to parse XML. It is not a description of a file format or of a unique programming language, so it might have nothing to do with the .hexpat file you found – or maybe that library uses a .hexpat as an intermediate filetype (but the page you linked doesn’t say it does, and nothing I see there leads me to believe that the library and the extension are in any way linked; given that the other code in this repo you found are python files, I’d be surprised if there was also a file related to a haskell library).

    Can you share a link to the .hexpat file itself?

    Didn’t know if it is on the list to be added or not.

    Notepad++ does not have a “list of languages to be added”. Notepad++ uses the library called “Lexilla” to handle that part of the codebase, so if the Lexilla project were updated to handle the .hexpat text-based file format specifically, then Notepad++ would have access to it … and once it was part of Lexilla, then someone could request that the Notepad++ developers add in the support for it. (Not that it’s relevant at this point in time, but a post in the Community of Notepad++ users is not the right place for feature requests, as our FAQ explains. But you are nowhere near the level of being ready to even officially make a feature request, so don’t worry about it for now.)

    Unless the .hexpat file extension were a lot more common than it appears to be (based on the lack of solid information about it, and possible collisions in the “hexpat” namespace across the internet), it is doubtful that it’s “important” enough to get added to Lexilla and thus would not propagate to Notepad++ either.

    For languages not found in Notepad++'s built-in language list, users are expected to:

    find a language that’s close enough: for example, parsing a header-looking file format like I linked with the C lexer, or an XML-based fileformat with the XML lexer, using the User ext box to associate that extension with a specific language, as I described above use the User Defined Language feature to add simple keyword-based syntax highlighting write (or commission someone to write) a lexer plugin
  • For plugins which use "NPPM_MENUCOMMAND"...

    1
    3 Votes
    1 Posts
    257 Views
    No one has replied
  • I would want to pin opened files

    2
    0 Votes
    2 Posts
    163 Views
  • FTP Plugin is Worthless

    8
    0 Votes
    8 Posts
    334 Views
    PeterJonesP

    @Kristy-Atkins said in FTP Plugin is Worthless:

    I need to be able to download multiple fileS from multiple website folderS on the server to
    MATCHING folders in my local website folder.

    I had forgotten, because I’ve never used that feature, but NppFTP has “Cache Paths” ability, which allows you to map specific local paths for specific remote paths.

    Go to your Profile Settings in NppFTP, and pick the profile for your host. Go to the Cache tab. put in the Local Path and External Path for the first pair, Add New; then repeat for additional folders. So, it already has that particular feature you requested, and your ire was misplaced on that one.

    I also need the FTP manager to be able to sort

    Sorting would be nice, and was asked for some time back… but apparently, someone who has a full-time job outside of NppFTP development, who is 100% volunteer, just hasn’t found the right Round Tuit™ to implement sorting. Since you imply that you have enough skills to write a full plugin, maybe you could put your effort into making the existing plugin better, and develop a PR that would implement sorting of the remote files list.

    update:

    I need to be able to select specific fileS in my LOCAL website folderS using a client side ‘tree’ and upload them to the matching folders on the server

    Use the Folder as Workspace or similar feature in Notepad++, and open the file(s) that you care about. Then, as long as the Cache Paths have been set up correctly and NppFTP is running, whenever you save the file in Notepad++, it will upload to the appropriate server location. But NppFTP isn’t meant as a full-featured FTP tool – it’s focused on the files you are editing in Notepad++, so if you want to easily upload a file that’s not open in Notepad++, you can either open it in Notepad++ and save it to trigger, or you could use a standalone FTP client for any files that you don’t want to open in Notepad++ (including non-text files, like images). And I second @Jim-Dailey’s suggestion of WinSCP, as that’s a good tool, and includes features for keeping remote-and-local in sync, which it sounds like what you want to do.

  • How can I Enable Syntax Highlighting in NPP?

    3
    0 Votes
    3 Posts
    270 Views
    S

    @PeterJones Thank you for solving my query!

  • Columns++ calculations

    4
    1 Votes
    4 Posts
    383 Views
    Mark OlsonM

    Anything you can do with Columns++ can (in principle) be done with PythonScript, and Python allows arbitrarily large integers.

  • [markdown] syntax color support for code blocks

    2
    0 Votes
    2 Posts
    772 Views
    PeterJonesP

    The UDL can handle doing different colors for `single backticks` vs triple

    ``` long code ```

    For example, here is a screenshot using the “markdown (preinstalled)” UDL that comes with Notepad++:
    5bee2f23-5331-485e-a948-783587fdf052-image.png

    Then, if I remove the single ticks from Delimiter 2 and move it to Delimiter 8 (which was empty before) and give 8 a different color, it works just fine:

    8df18d51-af9a-4f45-986a-aca6e6284a4d-image.png

    The one thing to keep in mind with making Delimiters for “triple” vs “single”: you have to put the triple before the single, otherwise when it’s doing it’s parsing, it will match on the single rule first. (It searches through the delimiters in the 1-8 order)

    And if you wanted to allow specific keywords (say keyword8) inside the triple quotes (delimiter 2), then you can go into the styler for delimiter2 and allow keyword8 inside:
    49f17867-6e52-4cdd-8d39-75f0f46c731b-image.png
    fc5ebe90-be88-4a3b-a81b-53b5a5ee8432-image.png

    I am not sure what you were trying to indicate with the “BNF” in your question: if you just meant keywords, then I’ve shown it works. But something like the @udtf(...) would be more difficult – at least with the way “markdown (preinstalled)” is defined. And getting full python highlighting inside of the code-block markdown is not possible, the way that UDL and N++ is implemented.

    But, at some point, based on the complexity you are describing, it might go beyond what UDL is capable of: UDL was meant for “simple” syntaxes, and if you wanted something more complicated, then the idea was that a lexer plugin could be the next step to bridge the gap between UDL and what N++ provides natively.