• Issue if Folding in code

    Help wanted · · · – – – · · ·
    3
    0 Votes
    3 Posts
    109 Views
    Zachary DeckerZ

    @PeterJones

    Thanks for the reply. I followed your suggestions, but these did not resolve the issue.

    However, I did find a solution after much troubleshooting. You noted that there can be issues if the first line is a comment. This is not the case in my file, but I realized the folding issue was correlated with the number of comments. Playing around with the Comment settings in the Comment & Number tab shows this to be true. I had some strange settings going on in there which worked for the comments, but screwed up the folding.

    a2656615-892c-4d50-a4e1-4423abdcf958-image.png

    Removing the Comment Style settings fixed the issue.

    Thanks
    Zach

  • How to add Translate plugin in NotePad++?

    General Discussion
    2
    0 Votes
    2 Posts
    221 Views
    PeterJonesP

    I’m using Notepad++ SING 2020 and it’s a really amazing software for all types of tasks.

    Never heard of that. Is “SING 2020” a plugin for Notepad++, or something else? What does it have to do with Notepad++?

    I need help with translation because my work needs to be around global clients and projects.

    There used to be a plugin called the “Translate Plugin” for Notepad++, which helped for translating the text in your document to a different language; it’s not supported by its developer anymore, though someone made a fork of it at https://github.com/databird/npptranslate64/releases – I don’t know if @databird is going to continue to support that fork or not, but that’s got a reasonable chance of being installable and being able to help you with your translation. (This discussion explains some of the difficulties with the original version, and mentions the new 64-bit release.)

    I want to know if Notepad++ supports multilingual language. It will be very helpful for me.

    Notepad++ “supports” multiple languages, in that the core application doesn’t care what language the text is written in, as long as you are using an encoding that supports all the characters you need – and if you’re using UTF-8 or UTF-16, then the encoding supports all Unicode codepoints, so that should be sufficient. :-)

    And Notepad++ “supports” multiple languages, in that you can use the Settings > Preferences > General > Localization feature to change what language is used for the GUI (menu names, etc). Though you can have only one active Localization at a time.

    But natively (ie, without plugins), Notepad++ does not have any facility to do translation of text. For that, you could use a plugin, like the npptranslate64 I linked to above. (There have also been some simple scripts written for the scripting plugins and shared in the forum at various times, but they are for simple lists of fixed input-phrase-to-output-phrase mapping, and should not be considered general-purpose translators.)

  • 0 Votes
    4 Posts
    116 Views
    Alan KilbornA

    @coltrane31 said in Different foreground/background colors per tab?:

    Is it possible to have two versions of the app installed at the same time

    See the user manual for “instances”; the user manual may be accessed via your ? menu in Notepad++. There are several alternative things you could do in this regard, although to get “different fg/bg colors per tab”, it all seems a bit much to go through.

  • Cannot open files by right click

    General Discussion
    4
    0 Votes
    4 Posts
    164 Views
    T

    @PeterJones, thanks for input, the most difficult task is to explain the issues to someone else!

    Thanks a lot, just needed an eyeopener! Hope it will help someone else with issues!

    Let´s try again.

    I click on download symbol in Edge, a list drop down I click on my file and it opens in file explorer If I right click and choose “show more options” I get the “Edit with Notepad ++” selection and if I use it the file opens.
    Success, I can use this option!

    Second scenario

    I click on download symbol in Edge, a list drop down I right click on my file and choose “open file” then it open in File explorer I choose “open with” new window opens and I try to use NP++ it don´t work.

    “When you say that choosing Notepad++ as the default program”
    I have chosen NP++ as default app in windows apps settings for .txt files.

    Notepad++ v8.7.4 (64-bit)
    Build time : Dec 4 2024 - 23:50:05
    Path : C:\Program Files\Notepad++\notepad++.exe
    Command Line :
    Admin mode : OFF
    Local Conf mode : OFF
    Cloud Config : OFF
    Periodic Backup : ON
    Placeholders : OFF
    DirectWrite : OFF
    Multi-instance Mode : monoInst
    File Status Auto-Detection : cdEnabledNew (for current file/tab only)
    Dark Mode : OFF
    OS Name : Windows 11 Enterprise (64-bit)
    OS Version : 23H2
    OS Build : 22631.4890
    Current ANSI codepage : 1252
    Plugins :
    AutoSave (2)
    CodeAlignmentNpp (14.1.107)
    ComparePlugin (2.0.2)
    DSpellCheck (1.5)
    HexEditor (0.9.12)
    JsonTools (5.6)
    mimeTools (3)
    NppConverter (4.5)
    NppExec (0.8.4)
    NppExport (0.4)
    NppFTP (0.29.12)
    PlantUmlViewer (1.8.0.12)
    XMLTools (3.1.1.13)

    Thanks a lot, just needed an eyeopener! Hope it will help someone else with issues!

  • 0 Votes
    4 Posts
    179 Views
    EkopalypseE

    @elecherf said in Bug 8.7.8: notepad is freezing with high cpu usage when sliding down the main split bar towards the bottom:

    For now, what I’ve understood is that EnhanceAnyLexer is not compatible with np++ 8.7.8

    EnhanceAnyLexer does not use any of the new features/improvements introduced by Npp recently.
    I have tested with BookmarksDook installed and can confirm that I see the same behavior, but further testing has shown that this also happens when BookmarksDook is the only plugin, besides the default plugins.

  • Story on XDA-Developers about Notepad++

    General Discussion
    1
    8 Votes
    1 Posts
    114 Views
    No one has replied
  • 0 Votes
    5 Posts
    160 Views
    Taras TkachenkoT

    @PeterJones That is probably the best. I don’t want a version cluttered with features.

  • 0 Votes
    2 Posts
    105 Views
    PeterJonesP

    @Wicke2d ,

    At startup of windows? Yes, there are multiple ways.

    You could create a .bat which runs two instances (ie, it calls c:\Program Files (x86)\Notepad++\notepad++.exe twice, at least one of which with the -multiInst option, or having the always-use-multiple-instances setting on in your Notepad++ config), and put that in your Startup folder (search the interwebs to see how to add something to the startup folder for your particular Windows version).

    Or you could use Task Scheduler to create a task that runs two instances of Notepad++ (again, with the -multiInst or the preference equivalent mentioned above)

    I have a dual desktop setup

    I, however, don’t think that either of those solutions would be able to put a separate instance on a specific Desktop when you first boot.

    I want to say maybe you could do it with calling a different session from the command-line in each, but I don’t think that would be able to automatically run them at bootup. Maybe someone else has some ideas.

  • 0 Votes
    30 Posts
    3k Views
    mpheathM

    @PeterJones

    I just tried the Notepad++.MSVC.x64.Release artifact and am impressed. It changes directly in the editor pane with checking and unchecking the checkbox. I tried cloned view and works good with both panes. I see NPPM_ACTIVATEDOC, that I presume it is helping to refresh the property change live.

    I have tested multiple Notepad++ restarts, checkbox changes and buffer changes. Tests are so good, that it should IMO fix and close the issue ticket #16244.

    Well done!

  • 0 Votes
    5 Posts
    138 Views
    PeterJonesP

    @ThosRTanner said in Are the shortcut key pointers when initialising your menu maent to be const ?:

    It does raise another question though - does that mean your menu structure have to remain unchanged once you’ve registered it with notepad++? If it was allocated in a piece of temporary memory which got discarded for instance it would be a little hard to track down!

    No. Plugins like NppExec and PythonScript change the number of menu entries on the fly, though I don’t know whether they can give those commands shortcuts when generated after-the-fact or not. You might be able to look through their source code to see how they dynamically add a new menu entry after-the-fact.

    As far as shortcuts are concerned, after the plugin’s initial request when it’s loaded, I believe the expectation is that the Shortcut Mapper will be used for any future changes to keyboard shortcuts (and that those are restricted to a plugin’s top-level of menu). And when PythonScript or NppExec dynamically adds a command to its top-level menu, Shortcut Mapper makes you wait until the next Notepad++ launch – when the entry is initialized at plugin load, rather than dynamically after – to be able to assign the keystroke.

    update: And when Shortcut Mapper changes any command’s shortcut, you can actually process NPPN_SHORTCUTREMAPPED to see how Shortcut Mapper changed your menu’s command.

  • 7 Votes
    5 Posts
    244 Views
    Lycan ThropeL

    @Coises ,
    This was much easier to follow, and it’s installed and I saw that it was there. Thanks. That’s it for now, as I’ve already burned my candle on both ends for now and am needing sleep, so…will play more later with your instructions to see how it fares. Thanks for the assist.

  • Yet Another C++ Plugin Template...

    Notepad++ & Plugin Development
    11
    4 Votes
    11 Posts
    898 Views
    ThosRTannerT

    @Alan-Kilborn fairly mature. I have a couple of other tweaks to do while trying to do a version of the linter plugin, which needed some extra functionality to make a few things simpler.

    That and it’s not really a template of course. It’s a library you can use.

  • 6 Votes
    15 Posts
    655 Views
    guy038G

    Hi, @coises and All,

    I think this will be the last answer concerning your Columns++_v1.2 plugin !

    Here is the recapitulation of the way to access the invisible characters, whatever the file type :

    For ANSI files : just one possible syntax for these collating names :

    [[.NUL.][.SOH.][.STX.][.ETX.][.EOT.][.ENQ.][.ACK.][.alert.][.backspace.][.tab.][.newline.][.vertical-tab.][.form-feed.][.carriage-return.][.SO.][.SI.][.DLE.][.DC1.][.DC2.][.DC3.][.DC4.][.NAK.][.SYN.][.ETB.][.CAN.][.EM.][.SUB.][.ESC.][.IS4.][.IS3.][.IS2.][.IS1.][.DEL.]] which returns 33 matches, against the Total_ANSI.txt file, wihich contains the 256 characters of the Win-1252 encoding

    Note that the lowercase syntax is NOT allowed, in ANSI files, for ANY collating names, presently in UPPER case

    Note also that the four chars, from \x1c to \x1f must be referred as from IS4 to IS1, in UPPER case ( and NOT from fs to us ! )

    For UTF-8 files : two possible syntaxes for these collating names :

    [[.nul.][.soh.][.stx.][.etx.][.eot.][.enq.][.ack.][.bel.][.bs.][.ht.][.lf.][.vt.][.ff.][.cr.][.so.][.si.][.dle.][.dc1.][.dc2.][.dc3.][.dc4.][.nak.][.syn.][.etb.][.can.][.em.][.sub.][.esc.][.fs.][.gs.][.rs.][.us.][.del.][.pad.][.hop.][.bph.][.nbh.][.ind.][.nel.][.ssa.][.esa.][.hts.][.htj.][.lts.][.pld.][.plu.][.ri.][.ss2.][.ss3.][.dcs.][.pu1.][.pu2.][.sts.][.cch.][.mw.][.spa.][.epa.][.sos.][.sgci.][.sci.][.csi.][.st.][.osc.][.pm.][.apc.][.nbsp.][.shy.][.alm.][.sam.][.ospm.][.mvs.][.nqsp.][.mqsp.][.ensp.][.emsp.][.3/msp.][.4/msp.][.6/msp.][.fsp.][.psp.][.thsp.][.hsp.][.zwsp.][.zwnj.][.zwj.][.lrm.][.rlm.][.ls.][.ps.][.lre.][.rle.][.pdf.][.lro.][.rlo.][.nnbsp.][.mmsp.][.wj.][.(fa).][.(it).][.(is).][.(ip).][.lri.][.rli.][.fsi.][.pdi.][.iss.][.ass.][.iafs.][.aafs.][.nads.][.nods.][.idsp.][.zwnbsp.][.iaa.][.ias.][.iat.][.sflo.][.sfco.][.sfds.][.sfus.]] which return 120 matches, against the Total_Chars.txt file

    [[.nul.][.soh.][.stx.][.etx.][.eot.][.enq.][.ack.][.alert.][.backspace.][.tab.][.newline.][.vertical-tab.][.form-feed.][.carriage-return.][.so.][.si.][.dle.][.dc1.][.dc2.][.dc3.][.dc4.][.nak.][.syn.][.etb.][.can.][.em.][.sub.][.esc.][.fs.][.gs.][.rs.][.us.][.del.][.pad.][.hop.][.bph.][.nbh.][.ind.][.nel.][.ssa.][.esa.][.hts.][.htj.][.lts.][.pld.][.plu.][.ri.][.ss2.][.ss3.][.dcs.][.pu1.][.pu2.][.sts.][.cch.][.mw.][.spa.][.epa.][.sos.][.sgci.][.sci.][.csi.][.st.][.osc.][.pm.][.apc.][.nbsp.][.shy.][.alm.][.sam.][.ospm.][.mvs.][.nqsp.][.mqsp.][.ensp.][.emsp.][.3/msp.][.4/msp.][.6/msp.][.fsp.][.psp.][.thsp.][.hsp.][.zwsp.][.zwnj.][.zwj.][.lrm.][.rlm.][.ls.][.ps.][.lre.][.rle.][.pdf.][.lro.][.rlo.][.nnbsp.][.mmsp.][.wj.][.(fa).][.(it).][.(is).][.(ip).][.lri.][.rli.][.fsi.][.pdi.][.iss.][.ass.][.iafs.][.aafs.][.nads.][.nods.][.idsp.][.zwnbsp.][.iaa.][.ias.][.iat.][.sflo.][.sfco.][.sfds.][.sfus.]] which returns 120 matches, against the Total_Chars.txt file

    -Note that the Uppercase syntax is allowed, in UTF-8 files, for ANY collating name, presently in LOWER case

    Finally, for an ANSI file, containing the 256 chars of the Win-1252 encoding and converted as an UTF-8 file ( Encoding > Convert to UTF-8 ), two syntaxes are possible :

    [[.nul.][.soh.][.stx.][.etx.][.eot.][.enq.][.ack.][.bel.][.bs.][.ht.][.lf.][.vt.][.ff.][.cr.][.so.][.si.][.dle.][.dc1.][.dc2.][.dc3.][.dc4.][.nak.][.syn.][.etb.][.can.][.em.][.sub.][.esc.][.fs.][.gs.][.rs.][.us.][.del.][.pad.][.hop.][.ri.][.ss3.][.dcs.][.osc.][.nbsp.][.shy.]] which returns 40 matches, agasint the Total_UTF-8.txt file

    [[.nul.][.soh.][.stx.][.etx.][.eot.][.enq.][.ack.][.alert.][.backspace.][.tab.][.newline.][.vertical-tab.][.form-feed.][.carriage-return.][.so.][.si.][.dle.][.dc1.][.dc2.][.dc3.][.dc4.][.nak.][.syn.][.etb.][.can.][.em.][.sub.][.esc.][.fs.][.gs.][.rs.][.us.][.del.][.hop.][.ri.][.ss3.][.dcs.][.osc.][.nbsp.][.shy.]] which returns 40 matches, against the Total_UTF-8.txt file

    Note that the Uppercase syntax is allowed, in UTF-8 files, for ANY collating name, presently in LOWER case

    Now, against the Total_ANSI.txt file, containing the first 256 UNICODE characters, we get these results :

    (?s). ANY character => 256 (?-s). ANY character different from LIKE-BREAKS => 253 = [^\x0A\x0C\x0D] [[:unicode:]] = \p{unicode} an OVER \x{00FF} character => 0 = [^\x00-\xFF}] [[:cntrl:]] = \p{cntrl} a CONTROL code character => 39 = [\x00-\x1F\x7F\x81\x8D\x8F\x90\x9D\xAD] [[:space:]] = \p{space} a WHITE-SPACE character => 7 = [\t\n\x0B\f\r\x20\xA0] [[:blank:]] = \p{blank} a BLANK character => 3 = [\t\x20\xA0] [[:upper:]] = \p{upper} an UPPER case letter => 60 = [A-ZŠŒŽŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ] [[:lower:]] = \p{lower} a LOWER case letter => 65 = [a-zƒšœžªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ] [[:digit:]] = \p{digit} a DECIMAL number => 13 = [0-9²³¹] [[:word:]] = \p{word} a WORD character => 139 = [[:alnum:]]|\x5F = \p{alnum}|\x5F [[:punct:]] = \p{punct} any PUNCTUATION or SYMBOL character => 80 = [\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E\x82\x84-\x87\x89\x8B\x91-\x97\x9B\xA1-\xBF\xD7\xF7] [[:alpha:]] = \p{alpha} any LETTER character => 125 = (?-i)[[:upper:][:lower:]] [[:alnum:]] = \p{alnum} an ALPHANUMERIC character => 138 = (?-i)[[:upper:][:lower:][:digit:]] [[:graph:]] = \p{graph} any VISIBLE character => 212 = [^\x00-\x1F\x20\x7F\x80\x81\x88\x8D\x8F\x90\x98\x99\x9D\xA0] [[:print:]] = \p{print} any PRINTABLE character => 219 = [[:graph:][:space:]] = [^\x00-\x1F\x20\x7F\x80\x81\x88\x8D\x8F\x90\x98\x99\x9D\xA0]|[[:space:]] [[:xdigit:]] an HEXADECIMAL character => 22 = [0-9A-Fa-f] = (?i)[0-9A-F]

    Remark : the [[:unicode:]] class; for characters OVER \x{00FF}, must correspond to the C1_DEFINED type from Ctype 1 list here.

    From this same article, and after I realized that the POSIX classes are not totally independent, I deduced this layout :

    C1_DEFINED Other characters 0 C1_CNTRL Control characters 39 C1_SPACE Space characters 2 ( only the SPACE and NBSP chars, OUT of 7, as ALL other are ALREADY included in the CNTRL chars class ) C1_UPPER Uppercase 60 C1_LOWER Lowercase 65 C1_DIGIT Decimal digits 13 C1_PUNCT Punctuation 73 ( and NOT 80, because the \xAD char is ALREADY included in the CNTRL chars class because the \xAA, \xB5 and \xBA are ALREADY included in the LOWER chars class because the \xB2, \xB3 and \xB9 are ALREADY included in the DIGIT chars class ) ----- TOTAL : 252 chars

    So, if I exclude, from my Total_ANSI.txt file, all the following classes with the S/R :

    FIND [[:cntrl:][:space:][:upper:][:lower:][:digit:][:punct:]]

    REPLACE Leave EMPTY

    Either, with your plugin or with native N++, it remains 4 characters ( 256 - 252 ) which are the ( \x{20AC} ), ˆ ( \x{02C6} ), ˜ ( \x{02DC} ) and ( \x{2122} ) characters

    Moreover, absolutely no POSIX character class and no UNICODE character class, of course, can find these 4 characters !

    Thus, the only way to find out one of these 4 characters, in an ANSI file, is to use the regex [\x80\x88\x98\x99] or to use the characters themselves :-((

    In this article, it is also said :

    Printable | Graphic characters and blanks (all C1_* types except C1_CNTRL). Thus …

    So, from the previous total of chars of my Total_ANSI.txt file, the [[:print:]] class should detect 252 - 39, so 213 matches.

    Thus, as [[graph:]] = [[:print:]] - [[space:]], this means that [[:graph:]] should be : 213 - 2, so 211 matches.

    But current result is 212 matches. The difference of one unit comes from the \xAD char whith is, both, part of the [[:cntrl:]] and [[graph:]] POSIX character classes !

    If we remember of the 4 lacking chars, which, obviously, are visible and printable, this means that [[:graph:]] and [[:print:] should return, respectively 215 ( 211 + 4 ) and 217 ( 213 + 4 ) matches, for ANSI files.

    And it easy to verify that [[:print:]] + [[:cntrl:]] = 217 + 39 = 256 !

    Just for info : from the Total_UTF-8.txt file, containing these same chars, we get these results :

    (?s). ANY character => 256 (?-s). ANY character different from LIKE-BREAKS => 254 = [^\x0A\x0D] [[:ascii:]] an UNDER \x{0080} character => 128 = [\x{0000}-\x{007F}] = \p{ascii} [[:unicode:]] = \p{unicode} an OVER \x{00FF} character => 27 = [^\x00-\xFF}] = [\x{20AC}\x{201A}\x{0192}\x{201E}\x{2026}\x{2020}\x{2021}\x{02C6}\x{2030}\x{0160}\x{2039}\x{0152}\x{017D}\x{2018}\x{2019}\x{201C}\x{201D}\x{2022}\x{2013}\x{2014}\x{02DC}\x{2122}\x{0161}\x{203A}\x{0153}\x{017E}\x{0178}] [[:cntrl:]] = \p{cntrl} a CONTROL code character => 38 = [\x00-\x1F\x7F\x81\x8D\x8F\x90\x9D] = \p{Cc} [[:space:]] = \p{space} a WHITE-SPACE character => 7 = [\t\n\x0B\f\r\x20\xA0] [[:blank:]] = \p{blank} a BLANK character => 3 = [\t\x{0020}\x{00A0}] = \p{Zs}|\t [[:upper:]] = \p{upper} an UPPER case letter => 60 = [A-ZŠŒŽŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ] = \p{Lu} [[:lower:]] = \p{lower} a LOWER case letter => 63 = [a-zƒšœžµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ] = \p{Ll} [[:digit:]] = \p{digit} a DECIMAL number => 10 = [0-9] = \p{Nd} [[:word:]] = \p{word} a WORD character => 137 = \p{L*}|\p{Nd}|_ [[:graph:]] = \p{graph} any VISIBLE character => 215 = [^\x00-\x1F\x20\x7F\x81\x8D\x8F\x90\x9D\xA0\xAD] = (?![\x20\xA0\xAD])\P{Cc} [[:print:]] = \p{print} any PRINTABLE character => 222 = [[:graph:][:space:]] = [^\x00-\x1F\x20\x7F\x81\x8D\x8F\x90\x9D\xA0\xAD]|[[:space:]] [[:punct:]] = \p{punct} any PUNCTUATION or SYMBOL character => 73 = \p{P*}|\p{S*} = [\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E\x{20AC}\x{201A}\x{201E}\x{2026}\x{2020}\x{2021}\x{2030}\x{2039}\x{2018}\x{2019}\x{201C}\x{201D}\x{2022}\x{2013}\x{2014}\x{02DC}\x{2122}\x{203A}\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7] [[:alpha:]] = \p{alpha} any LETTER character => 126 = \p{L*} = \p{Lu}|\p{Ll}|[ˆªº] [[:alnum:]] = \p{alnum} an ALPHANUMERIC character => 136 = \p{L*}|\p{Nd} [[:xdigit:]] an HEXADECIMAL character => 22 = [0-9A-Fa-f] = (?i)[0-9A-F]

    Best regards,

    guy038

  • Gcode text file analyzing

    Notepad++ & Plugin Development
    8
    0 Votes
    8 Posts
    219 Views
    Michael VincentM

    @Holger-Suchi said in Gcode text file analyzing:

    Maybe there is already available a plugin that does the following (or could be a basis to mod):

    @PeterJones

    There aren’t any general-purpose GCode plugins available, to my knowledge.

    There is https://github.com/NCalu/NCneticNpp

    Not sure it’s in Plugin Admin so you need to go looking and manually install.

    UPDATE: Also never used it myself so have no idea if it’s of any use - I don’t do any GCode work at all myself.

    Cheers.

  • Notepad++ v8.7.8 Release Candidate

    Announcements
    7
    4 Votes
    7 Posts
    1k Views
    xomxX

    Possible v8.7.8 regression: GitHub issue #16250 .

  • Notepad++ v8.7.7 released

    Announcements
    20
    4 Votes
    20 Posts
    4k Views
    Lycan ThropeL

    @xomx ,
    Understood. I wouldn’t want to rush stability, but I agree with your assessment that it’s a straight forward fix that I don’t think would affect anything else but what’s intended, but I can wait if need be. Thanks again for the help with unraveling this while I was trying to find out the actual issue at the heart of the problem.

  • 0 Votes
    3 Posts
    152 Views
    mathlete2M

    @PeterJones said in Multi-language syntax-highlighting:

    not every XML-based file will use a Setting tag with the Type=“htf:jscriptexec” attribute to indicate javascript

    True, but to be fair, the jscript part of the Type attribute does give a sensible starting point for language-specific formatting rules. Whether or not the feature is easy to implement this way is another story…

    Given that @Blastocystis focused more on the CDATA section of the sample code, I’m guessing that (s)he was hoping for a more generic secondary language feature - one that gives users flexibility with the secondary language used. So, instead of applying a single language (the one selected in the current Language menu) to an entire document, have a Secondary Language menu that is designed to work on subsections of the document (to be marked in a specific manner). I could see this being equally complex to implement, though.

    Either way, perhaps it would make more sense to use/add a feature like Bookmarks to control where secondary language formatting is applied. In other words, give users the ability to directly choose which lines they want to format in another language by clicking on the margin.

  • 0 Votes
    13 Posts
    427 Views
    Alan KilbornA

    I must say that I like the functionality provided by the script myself, and I’ve started to use it. One thing I don’t particularly like, however, is not anything to do with the script, but rather how the NextResult (F4) and PreviousResult (Shift+F4) functionality works. After the last match is encountered, another F4 “wraps around” to the first match. It’s similar for Shift+F4. I find this annoying for reasons I’ve specified HERE. If other users feel the same way, and can publicly state so, maybe we can get an option to control this behavior.

  • batch script run in place

    Notepad++ & Plugin Development
    2
    0 Votes
    2 Posts
    120 Views
    PeterJonesP

    @Chris-Robertson ,

    You didn’t say, but for the sake of my answer, I will assume when you say “I can run my script in place”, you mean “I use the Run > Run menu command to run cmd /c "$(FILE_NAME)" (or similar) to run the active file using its default assocation” or maybe “I have saved that Run > Run command into the Run menu, and maybe have a keyboard shortcut for it”. If I have misinterpreted your statement, you will have to clarify with much more detail.

    The Notepad++ macro system can record certain actions then play them back. Unfortunately, as explained in our FAQ: Automating Notepad++, certain commands – like those from plugins, and the user-defined commands that you save in the Run menu (or even calls to other macros) – cannot be recorded . However, that same FAQ explains that you can trick the macro system to run non-recordable commands by manually editing the macro, as described in that second post. So you could manually create a macro that runs the File > Save then runs the dynamic menuCmdID assigned to your Run command or Plugin command, that you can find using UISpy!

    Alternatively, the NppExec plugin is designed for being a “shell scripting” language for Notepad++, allowing running various N++ commands and various filesystem commands. I have saved the following NppExec script as RunMyself, which saves the active file, changes to that file’s directory, and runs that file:

    NPP_SAVE cd "$(CURRENT_DIRECTORY)" cmd /c "$(FILE_NAME)"

    … and I use Shortcut Mapper to set its keyboard shortcut to F5 (and relegate the Run>Run command to Ctrl+Shift+F5, because I’d rather have the easiest shortcut be for the actions I use the most)

    You could do a similar script for the PythonScript plugin or other of the scripting plugins, but IMO, NppExec is best suited when you are trying to do just a sequence of actions that are too complex for Macros, but don’t have the logic or computational needs of a full programming language like Python.

  • RegEx This but not that

    Help wanted · · · – – – · · ·
    3
    0 Votes
    3 Posts
    117 Views
    Robert Or Janet DiebelR

    @Mark-Olson Thanx. Your time and effort is much appreciated