• User defined Macros in menu (shortcuts.xml)

    4
    0 Votes
    4 Posts
    919 Views
    Michael VincentM

    @Ekopalypse

    Thanks for the link, very informative. Assuming those are the only “macroable” messages as they may only require a simple wParam / lParam value as that’s all you can supply in the XML macro objects? Seems like the list could be expanded as the one I was quoting - SCI_SETMULTIPASTE (2614) - takes only an integer 0 or 1 for the wParam to turn it on or off.

    I only found out about this feature by reading the Scintilla docs after implementing add to selection via an NppExec script as per your suggestion and adding them to the Macro menu via NppExec.ini. Now when I made a multiple selection with mapped shortcut keys and typed, it all worked great, but using paste (from a previous copied text), it only pasted on the first selected text, not all selections. And that’s because SCI_SETMULTIPASTE is off by default. A quick NppExec:

    SCI_SENDMSG SCI_SETMULTIPASTE 1

    turned it on and then retrying my multiple selection paste worked to paste to all selections! Brilliant!

    So of course I wanted this as a turn on / turn off menu item and thought of the Macro XML in shortcuts because of @guy038 's suggestion. I couldn’t get @guy038 virtual space macro to work (assuming because that’s an enhancement of 7.7.1 and I’m only on 7.7 not using the release candidate), so again, a quick NppExec script:

    SCI_SENDMSG SCI_SETVIRTUALSPACEOPTIONS 5 // for "default" behavior SCI_SENDMSG SCI_SETVIRTUALSPACEOPTIONS 7 // for all on SCI_SENDMSG SCI_SETVIRTUALSPACEOPTIONS 0 // for all off

    and it worked fine for me. So I added the Macros to my shortcuts.xml in prep for the 7.7.1 release and then asked my question about other ‘macroable’ things that I’ve just been doing with quick NppExec scripts using SCI_SENDMSG.

    Just BTW, NppExec (along with I’m assuming PythonScript and LuaScript which I don’t use but see great advice about) are awesome plugins that can immediately extend N++ new Scintilla features even if N++ doesn’t yet have menu items to access them direct. Based on the messages in this form, with NppExec, I’ve added an “add / clear annotation”, “add / clear multiedge”, “add to / add all / remove last from current selection”, the multipaste on/off I discussed in this post … the list goes on …

    @donho thanks for the Scintilla upgrade!

  • NPP crashes when opening UNIX file with "NULL" chars on it

    2
    0 Votes
    2 Posts
    416 Views
    Meta ChuhM

    welcome to the notepad++ community, @Leo-Lagos

    no, notepad++ should not crash, if a file contains 0x00 characters.
    maybe it’s a plugin like the dspellcheck plugin that causes this ?

    please test the following, to verify, if a clean notepad++ (without any plugins that could cause this) would work on your system.

    download the notepad++ 7.7 portable version from >>> here <<<.
    (the portable version does not require any installation and runs completely independent and isolated from your installed version. all custom settings, as well as any stuff you might want to try at the portable version, will not modify your installed version)

    extract npp.7.7.bin.zip to your desktop.

    important note: make sure to close all instances of notepad++ that might be running, before starting the portable version at the next step, to make sure you are using this portable version.

    open the extracted npp.7.7.bin folder and start this portable version by double-clicking on notepad++.exe inside this folder.
    (note: notepad++.exe will just be seen as notepad++, if you have enabled to hide all known file extensions at your explorer settings)

    try to open the original unix file containing 0x00 characters.

    many thanks and best regards.

  • Multiple text and combine in specifique line order.

    4
    0 Votes
    4 Posts
    561 Views
    Terry RT

    @AV-Chan said:

    How can we do this?

    Version 2 of the solution.
    For the files containing text 1 and 2, use the step (i mentioned in first post) to prepended characters for file 2. So both these files will have a number (with leading zeros), both followed by a b character and a space.

    For the regex to apply (after making sure last line is a blank line).
    Find What:(?-s)^(\d+)a.+\R(\1b.+\R)
    Replace With:\2

    We can do this as the 2 lines we are ‘inserting’ will never be in the same location, thus designating differently as ‘b’ and ‘c’ is not required.

    And lastly I’ve also managed to combine to removal of the prepended characters and removing the last line as 1 regex.
    Find what:^\d+[ab]\s|\R\z
    Replace With: <— nothing in this field

    If any issues/queries please do post back. Actually, post back if it all works as planned. We ALL like the warm fuzzy feeling's we get from a good result.

    Terry

  • 0 Votes
    17 Posts
    3k Views
    EkopalypseE

    @andrecool-68
    sometimes I feel the same, but most IT documentation is in English, so … we have to live with it … until the Chinese take over operating system development :-) then we have to learn Mandarin :-)

  • write line with macro

    Locked
    1
    0 Votes
    1 Posts
    316 Views
    No one has replied
  • Opening a .dxl file from Notepad++

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    EkopalypseE

    @Don-Fowler

    the debug-info from the ? menu would allow us to see how npp has been installed
    in order to provide a more detailed info what you can try to make this work again.
    Currently, I can only advise to rename config.xml and hoping you are taking the correct one.

  • Validating Notepad++ with Section 508 (Americans with Disability Act).

    5
    0 Votes
    5 Posts
    903 Views
    EkopalypseE

    @Jeffrey-Hennessey

    this VPAT has been released.

  • Is there any way to use Npp with WSL?

    11
    2 Votes
    11 Posts
    3k Views
    Griffin O'NeillG

    I recently made a script to aid the use of Npp within WSL with the help of wslpath. I was trying to make an easy way to edit files in the WSL filesystem without breaking the rule that Linux files must not be directly edited by Windows software. It seems to work as far as my initial tests go. Take a look here, and feel free to modify it for your own use. (Let me know if you find any better ways to do this).

  • Partial css syntax highlighting does not work

    Locked
    4
    0 Votes
    4 Posts
    729 Views
    andrecool-68A

    Imgur
    :))))

  • 0 Votes
    4 Posts
    668 Views
    PeterJonesP

    @guy038 said:

    I noticed the two consecutive items javascript and javascript.js

    I think this also harkens back to the functionList.xml having two entries (L_JS=19 and L_JAVASCRIPT=58)

    I’m not a specialist of Java,

    Obviously not ☺, since you made the common mistake of confusing Java and JavaScript (or you made a typo).

  • Can't type national signs in ANSI files anymore

    Locked
    3
    0 Votes
    3 Posts
    525 Views
    Cheshire CatC

    You’re right, I installed back the older version and everything went back to normal. Thank you.

  • Json search found field not dark enough

    Locked
    2
    0 Votes
    2 Posts
    490 Views
    EkopalypseE

    @bob-kraft

    how can you search using json viewer plugin?
    Afaik, json viewer shows only a tree like view of your current json file.

    If a normal search is meant, you can change the styling via settings->style configurator->global styles->current line background and/or smart highlighting

  • VS2019 debugging of Notepad++ source code yields admin mode

    Locked
    9
    1 Votes
    9 Posts
    1k Views
    PeterJonesP

    @Alan-Kilborn said:

    I did some of that same research.

    I assumed you would have. But I know that often, I just don’t come up with the right combo of keywords for google to give me the answer that I need. Sometimes it just takes another googler to find it for you – well, for me, anway. Obviously, I didn’t find it for you :-)

    I was hoping you would find a solution. There have been hints at work that a project or two down the road (so probably next year), I’ll be switching from my proprietary-program-language-to-support-hardware-A which I’ve been using for the last decade to a VisualStudio/C++ -with-proprietary-libraries-to-support-hardware-B… so if VS is going to be giving RunAsAdmin difficulties, I was going to want someone else to have blazed the trail to a solution for me. :-)

  • How to select *A to *B in Notepad++

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Alan KilbornA

    @pranav-garware said:

    I don’t want to scroll down too long either

    An often overlooked N++ command is Begin/End Select on the Edit menu. Find where you want your eventual selection to start and run that command. Then find where you want the future selection to stop (maybe use a Find action for this…or big scrollbar drag…or whatever…) and invoke the command again. Blammo, you now have a big marked selection.

  • How to get correct syntax highlighting for Python 3 formatted strings

    Locked
    9
    1 Votes
    9 Posts
    3k Views
    Giulio.PortioliG

    Thanks all for the comments. Yes, adding those four lines to stylers.xml worked perfectly.

    I’m glad it will be fixed in the next release. I knew the issue must have already been picked up by someone.

  • Notepad++ crashing on startup

    Locked
    17
    0 Votes
    17 Posts
    6k Views
    PeterJonesP

    @Віталій-Лукіянчук said:

    Only -nosession helps.

    I just deleted AppData\Roaming\Notepad++\session.xml and it seems problem is solved.

    Glad it works for you now. (My guess is that you had either a file that no longer exists, or a file that does exist, but on a network drive rather than a local drive… By ignoring or deleting the old session, it stopped trying to access that file, and was able to properly load Notepad++.)

  • Need Assistance Regarding a Find/Replace

    Locked
    5
    0 Votes
    5 Posts
    705 Views
    Justin E. MillerJ

    I got it.
    Find my requested string:
    ^([A-Z])\w+\s+([A-Z])\w+,

    Replace with:
    \n$0

    Making sure match case is set.
    This separates everything out so that it looks like this:
    Bethys Grimlaw, a capable trapper. Has wild blue
    eyes, straight blond hair, a plain face, and a lean
    build. Described as sympathetic though dull.
    Spouse: Senn. 1 child

    Laval Heldsheath, a talented herder. Has large
    blue eyes, wavy red hair, a smooth face, and a
    stocky build. Described as adventurous though
    stubborn. Spouse: Mirri. 2 children

    Jakov Buckhorn, a talented trapper. Has close-set
    brown eyes, dry brown hair, a sculpted face, and a
    willowy build. Characterized as insecure and
    critical. Spouse: Arveera.

    Gothar Longborn, a competent farmer. Has
    knowing blue eyes, brittle auburn hair, a
    blemished face, and a sinewy build. Said to be
    gentle though coy. Spouse: Shatha. 1 child

    Eliminates the issue with lines with no children.

    Do a find\replace of “\r\n” replacing with nothing, changing to extended search mode.
    This made 2500 lines how I needed it out of a document that was originally 9,982 lines long.

  • Notepad++ generates corrupt files for Linux (Shell script)

    Locked
    7
    0 Votes
    7 Posts
    2k Views
    Meta ChuhM

    @dinkumoil

    oooops, my apologies, i just wrote this from top to bottom, after already having done those settings.
    thanks for the correction before anything happens.

    upsi, klaro … ich sollte besser mitschreiben während ich was einstelle, statt danach aus dem gedächtnis.
    sorry, für meinen senf. war gut gemeint, bringt aber natürlich nichts, wenn dadurch das eol format nicht mitgespeichert wird.
    danke für’s ausbessern, bevor was passiert.

    glg

  • 0 Votes
    8 Posts
    905 Views
    Ricardo E. TrellesR

    UPDATE TWO:
    All my concerns and doubts in this post seem to be solved!

    Original, not modified, versions of NP++ come with style for JavaScript/“operator” set to black/bold. Surprisingly that makes all braces/brackets bold by default! One has to remove that original bold setting to have that match check shown with black/bold.

    It seems there is no way to set a full even background color for a language, except when it is embedded. JS (embedded) can be set, PHP too, actualy PHP is always embedded between <?php ?> tags, even if there is nothing else outside the tags. Contents of a JS file isn;t embedded when you check it by itself.
    I had the wrong impresion code of a JS file was shown in a light blue tint for the background, actually it has a white background (I would like to see it as it is when embedded, though!).

    Finally
    3. If one makes a new installation in a fresh folder and copy config.xml from another installation, this config.xml carries a line like
    <GUIConfig name=“stylerTheme” path=“C:\ …\np++previous\stylers.xml” />
    and previous stylers.xml continue to be used in the fresh new installation.

    So now everything is working basically well for me, I 'm happy, and very thankful to Meta Chu for the quick start.

    But I’ll be back. We need a better way to use sessions than having several installations ( or having to save/load sessions files all the time ).

    Thank you for the attention.

  • Batch delete a RANGE OF LINES in multiple files?

    Locked
    4
    1 Votes
    4 Posts
    1k Views
    Alan KilbornA

    @Mike-Mitchell

    Well…let’s see how it goes on your data…