• Python in Notepad++

    Locked
    2
    1 Votes
    2 Posts
    1k Views
    EkopalypseE

    @Sean-Anigans

    well it depends what exactly you want to do and which python version you wanna use and how flexible it should be and …

    Npp does not have a builtin python interpreter but there are plugins which allow to execute python code
    either natively like PythonScript or with a local installation like NppExec. If you want to use Python3 then I would argue that NppExec is the way to go.
    NppExec provides a builtin console and a way to configure what needs to be executed.

  • Editing 'liquid' programming language

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    EkopalypseE

    @Nick-Felton

    if you find a builtin language which, more or less, meets your needs you might
    think about enhancing it by using a python script like discussed here.

  • Find an replace

    Locked
    4
    0 Votes
    4 Posts
    1k Views
    Thirsty for KnowledgeT

    Great, thanks for you fast help, now I’m happy :-)

  • 0 Votes
    2 Posts
    895 Views
    PeterJonesP

    @gayathri-priya, welcome to the Notepad++ Community forums.

    You said:

    I just want to select the name in each instance - just ABC and GBC.

    Assuming that your data rendered accurately, and any the name is the first word on the line after a “header line” that starts with literal “Name” (with no spaces before)

    Find = ^Name.*\R\K\w+ Mode = Regular Expression

    This finds a line starting with name, then advances the search thru the EOL for that line, moves down to the next line, starts the match over, and matches just the first “word” characters (alphanumeric and underscore, for regex)

    -----
    FYI: here is some helpful information for finding out more about regular expressions, and for formatting posts in this forum (especially quoting data) so that we can fully understand what you’re trying to ask:

    This forum is formatted using Markdown, with a help link buried on the little grey ? in the COMPOSE window/pane when writing your post. For more about how to use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end. It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes ("") to curly “smart” quotes (“”), will change hyphens to dashes, will sometimes hide asterisks (or if your text is c:\folder\*.txt, it will show up as c:\folder*.txt, missing the backslash). If you want to clearly communicate your text data to us, you need to properly format it.

    If you have further search-and-replace (“matching”, “marking”, “bookmarking”, regular expression, “regex”) needs, study this FAQ and the documentation it points to. Before asking a new regex question, understand that for future requests, many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backward to get things working for you. If you need help formatting, see the paragraph above.

    Please note that for all regex and related queries, it is best if you are explicit about what needs to match, and what shouldn’t match, and have multiple examples of both in your example dataset. Often, what shouldn’t match helps define the regular expression as much or more than what should match.

  • Need some help about GPG signatures... !

    12
    2 Votes
    12 Posts
    6k Views
    PeterJonesP

    Sorry about the delay. I had a busy family weekend this weekend.

    @guy038 said:

    I would like to re-create my key-pair, with a size of 4096 bytes ( instead of 2048 ) I suppose that the best way is to delete my present key-pair and generate a new key-pair, afterwards, isn’t it ?

    Yes.

    In other words, Don must be the ONLY person which could be able to recover the original .7z archive in the Test.7z file , from the npp.7.6.5.bin.7z.sig signature, with the command :

    gpg -u Notepad++ -o Test.7z -d npp.7.6.5.bin.7z.sig, because he would use the private key of his certificate ! Peter, am I right about it ?

    Not quite. A signature is a one-way hash: you can take a file, and easily create the signature of the file; however, it is impossible to go the reverse direction. For example, if I were to sign my copy of the gpg.exe, I would see:

    C:\Program Files (x86)\GnuPG\bin>gpg --detach gpg.exe C:\Program Files (x86)\GnuPG\bin>ls -latr gpg.exe* -rwxrwxrwx 1 Peter.Jones 0 1122816 2018-11-12 03:52 gpg.exe -rw-rw-rw- 1 Peter.Jones 0 566 2019-04-08 06:05 gpg.exe.sig

    There aren’t any compression algorithms that I know of that are good enough to encrypt-and-compress a 1.1MB gpg.exe into 566 bytes of gpg.exe.sig.

    All you can do with the signature for a file is (1) verify that the file matches the signature, and (2) that the person who claimed to sign it is the one who signed it (based on whether the public key matches what’s in your keyring).

    I think one of the confusions is that there are three different kinds of “signing” for files:

    Commands: -s, --sign make a signature --clear-sign make a clear text signature -b, --detach-sign make a detached signature The --sign (-s) creates an output file that includes the original file, plus your signature of that file. For example, in signing the standard-input as the input file: C:\Program Files (x86)\GnuPG\bin>gpg -a --sign hello world ^Z -----BEGIN PGP MESSAGE----- owEBWgKl/ZANAwAIAa7S8NjBGc6nAcsTYgBcq0qBaGVsbG8gd29ybGQNCokCMwQA ... -----END PGP MESSAGE----- The --clear-sign will do the same, but it will include the message in plain text, rather than encoded in the base-64 message, like: C:\Program Files (x86)\GnuPG\bin>gpg -a --clear-sign hello world ^Z -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 hello world -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEUi8A41Z69RBzWhJIrtLw2MEZzqcFAlyrSs0ACgkQrtLw2MEZ ... -----END PGP SIGNATURE----- Finally, --detach-sign (-b) creates a file that has only the signature, without the original file embedded. This is as my example above, with the signature for gpg.exe being only 566 bytes

    (in the examples above, I used the -a to “ascii-armor” the results, so the signatures were printable on the screen)

    When a software distributor has available for download the original file blah.zip, alongside another file called blah.zip.sig, the .sig file is usually the detached signature created by --detach-sign, so does not contain the original file as well.

    If you want a copy of the file that has the signature embedded in the archive, you would use just the --sign argument: without the -a ascii-armoring, it will go in blah.zip.gpg; with the -a ascii-armoring, it would go in blah.zip.asc.

    Maybe this series of examples will make more sense:

    ----

    Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:37 AM <DIR> . 04/08/2019 06:37 AM <DIR> .. 04/08/2019 06:36 AM 52,087 Temp.zip 1 File(s) 52,087 bytes 2 Dir(s) 110,105,284,608 bytes free C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>gpg --sign Temp.zip C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>dir Volume in drive C is Windows Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:37 AM <DIR> . 04/08/2019 06:37 AM <DIR> .. 04/08/2019 06:36 AM 52,087 Temp.zip 04/08/2019 06:37 AM 49,525 Temp.zip.gpg 2 File(s) 101,612 bytes 2 Dir(s) 110,105,165,824 bytes free C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>gpg -o NewTemp.zip --decrypt Temp.zip.gpg gpg: Signature made 04/08/19 06:37:27 Pacific Daylight Time gpg: using RSA key ZZZ___WORK_SIG___ZZZ gpg: Good signature from "Peter C. Jones <peter.jones@__work__>" [ultimate] gpg: aka "Peter C. Jones <peter.jones@__work__>" [ultimate] C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>dir Volume in drive C is Windows Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:37 AM <DIR> . 04/08/2019 06:37 AM <DIR> .. 04/08/2019 06:37 AM 52,087 NewTemp.zip 04/08/2019 06:36 AM 52,087 Temp.zip 04/08/2019 06:37 AM 49,525 Temp.zip.gpg 3 File(s) 153,699 bytes 2 Dir(s) 110,105,092,096 bytes free C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>fc Temp.zip NewTemp.zip Comparing files Temp.zip and NEWTEMP.ZIP FC: no differences encountered C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>del Temp.zip.gpg NewTemp.zip C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>gpg --detach-sign Temp.zip C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>dir Volume in drive C is Windows Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:39 AM <DIR> . 04/08/2019 06:39 AM <DIR> .. 04/08/2019 06:36 AM 52,087 Temp.zip 04/08/2019 06:39 AM 566 Temp.zip.sig 2 File(s) 52,653 bytes 2 Dir(s) 110,105,157,632 bytes free C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>gpg --verify Temp.zip.sig gpg: assuming signed data in 'Temp.zip' gpg: Signature made 04/08/19 06:39:03 Pacific Daylight Time gpg: using RSA key ZZZ___WORK_SIG___ZZZ gpg: Good signature from "Peter C. Jones <peter.jones@__work__>" [ultimate] gpg: aka "Peter C. Jones <peter.jones@__work__>" [ultimate] C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>dir Volume in drive C is Windows Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:39 AM <DIR> . 04/08/2019 06:39 AM <DIR> .. 04/08/2019 06:36 AM 52,087 Temp.zip 04/08/2019 06:39 AM 566 Temp.zip.sig 2 File(s) 52,653 bytes 2 Dir(s) 110,105,157,632 bytes free C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>gpg -o OutTemp.zip --decrypt Temp.zip.sig gpg: assuming signed data in 'Temp.zip' gpg: Signature made 04/08/19 06:39:03 Pacific Daylight Time gpg: using RSA key ZZZ___WORK_SIG___ZZZ gpg: Good signature from "Peter C. Jones <peter.jones@__work__>" [ultimate] gpg: aka "Peter C. Jones <peter.jones@__work__>" [ultimate] C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example>dir Volume in drive C is Windows Directory of C:\Users\PETER~1.JON\AppData\Local\Temp\gpg-example 04/08/2019 06:39 AM <DIR> . 04/08/2019 06:39 AM <DIR> .. 04/08/2019 06:36 AM 52,087 Temp.zip 04/08/2019 06:39 AM 566 Temp.zip.sig 2 File(s) 52,653 bytes 2 Dir(s) 110,105,100,288 bytes free
  • Backup Settings Resetting > Files LOST!

    Locked
    7
    0 Votes
    7 Posts
    3k Views
    Alan KilbornA

    Maybe a possible cause is running N++ with multiple instances and closing the non-original instance last? I seem to recall that some settings get disabled for a second+ instance and if you close the ORIGINAL instance with any others still open, when you finally close those, their settings become your new default settings. Maybe something to check…

  • Notepad++ raises an error when closed

    Locked
    12
    0 Votes
    12 Posts
    5k Views
    bolandrossB

    @guy038
    Hey, thanks for the suggestions!

    I was using v1.4.10.0 and updated to v1.4.11.0, but unfortunately the problem stayed.

  • Visual Foxpro Language

    Locked
    4
    0 Votes
    4 Posts
    5k Views
    dvince247D

    Thank you all for your time and for your know how. I appreciate that.

  • Can,t find a html or xml language to set

    Locked
    4
    2 Votes
    4 Posts
    2k Views
    Meta ChuhM

    welcome to the notepad++ community, @Konrad-Bińko

    please test the following, to verify, if a clean notepad++ would show html and xml language selections on your system:

    download the notepad++ 7.6.6. 64 bit 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.6.6.bin.x64.zip to e.g. 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 the portable version for this test.

    open the extracted npp.7.6.6.bin.x64 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 activated to hide all known file extensions at your windows explorer settings)

    test if html and xml selections, as well as css, are shown at the alphabetically cascaded language menu.

    if this portable version works for you as expected, please provide us with the debug information of your installed notepad++, by going to the menu ? > debug info... > copy debug info into clipboard and pasting it here, for further guides and fixes.

  • Spell Check

    Locked
    3
    0 Votes
    3 Posts
    47k Views
    Stephen AustinS

    Very helpful. Was looking around for that. Many thanks for taking the trouble to post it. APpreciated.

  • ToolTips don't work on Toolbar.

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Meta ChuhM

    splendid, thanks for your feedback, @GrantHorizons.
    we are glad to be of help.

  • Incremental search next/prev shortcuts

    Locked
    2
    0 Votes
    2 Posts
    819 Views
    Alan KilbornA

    @satyagraha

    The keycombos in the incremental search window aren’t remappable like the keycombos in the editing tab windows. However, this may be of interest: https://notepad-plus-plus.org/community/topic/14271/keyboard-shortcut-for-next-previous-incremental-search-result

  • Re: "Notepad++ v7.6.6 & GPG signatures"

    Locked
    6
    3 Votes
    6 Posts
    2k Views
    Meta ChuhM

    @Alan-Kilborn

    It was a little discouraging–even before the big bug was noticed–to see the RC then like, what, a day or 2 later the actual release (not sure what the “ideal” period would be; reality seemed a tad short).

    you are absolutely correct.
    i think it would have been best to pre-announce the introduction of rc community trials, and how to handle them.
    the first rc was very unexpected for quite a few.

    afaik, the short period between rc and a as soon as possible release, was maybe not just because of gpg, or to release it before 04.01, but also due to important issue reports with 7.6.4 and below.

    Which was THEN followed rapidly by the critical bug being found. Was it found because the real release happened and so many more people jumped on it, thus finding the bug?

    don found it, no one else did.

    Or would a longer RC period have turned it up?

    maybe, maybe not.
    but perhaps now, that a bug has been missed at the first rc batch, maybe a few who like testing will be more challenged to find a bug at eventual next rcs, or the appveyor builds, who knows.

    Hmmm, will never know.

    exactly ;-)

  • Problem The program does not know the scss file

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    andrecool-68A

    Try to do so:

    Imgur

  • Parse html file - Ideas wanted

    Locked
    17
    2 Votes
    17 Posts
    6k Views
    Alan KilbornA

    @peterelli said:

    Where can i find some informations about the formatting options to separate the needed data?

    This is a good starting point: https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation

  • I need to cut a text in a certain position which is always different

    Locked
    3
    0 Votes
    3 Posts
    763 Views
    Veronica BalanV

    @PeterJones thank you, I will check it too, and yes, I use perl for that manipulation
    I have some ideas about how to solve the problem, just wanted to find out if there is something easier than I think

  • Position on opening

    Locked
    5
    0 Votes
    5 Posts
    788 Views
    Meta ChuhM

    @Roger-Morris

    maybe the log file monitoring function is enabled:

    make sure view > monitoring (tail -f) is disabled.
    if it is enabled it would reload and scroll to the end of a file.

    if it would be activated, you would see an eye instead of a disk at the tab, as seen at the screenshot below.

    Imgur

  • Request for new possibility to change font size within NPP gui itself

    3
    1 Votes
    3 Posts
    738 Views
    Andreas HoppeA

    Hello,

    now I opened a feature request on github:
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5486

    Regards

    Andreas

  • Auto Highlight and copy to clipboard using mouse wheel.

    Locked
    11
    0 Votes
    11 Posts
    2k Views
    cedr777C

    The built in macro worked nicely! I think I will stick to it.

  • Regular expression + latex

    Locked
    4
    0 Votes
    4 Posts
    812 Views
    jjulianorsJ

    @Alan-Kilborn
    That works… thanks a lot!