• EML as supported file language style

    1
    0 Votes
    1 Posts
    786 Views
    No one has replied
  • Tabs to spaces

    6
    0 Votes
    6 Posts
    33k Views
    guy038G

    Hello, @the-fartman and All,

    I realize that I made some syntax errors in the last part of my last and very old post ( After the P.S. indication )

    So, here is the updated version :

    P.S. :

    Here is, below, a mRNA sequence, translated into proteins, by a ribosome of a living cell ( found somewhere, in a regex documentation, to explain the interest of the \G regex feature ! ) :

    ....AUGGGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAAUAG

    If we take off the start codon AUG and its leading nearby sequences, as well as the stop codon UAG, we, now, obtain the sequence :

    GGUCGACUGGUUCUCGAAGGUUUCAAAGGUUCAAGGGUCCGGUAUUCAGUCGUCCGCUCUACUGGUACAAAGGGGGUACCACGACUGGUUCUCGAA ¯¯¯ ¨¨¨ ¯¯¯ ¯¯¯ ¨¨¨ ¨¨¨ ¯¯¯ ¨¨¨ ¨¨¨ 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

    In that RNA sequence, let’s consider the amino-acid sequence GGU. You remark, easily, that :

    At positions 1, 19, 28 and 64, this sequence is a TRUE codon

    At positions 9, 36, 41, 75 and 87, this sequence is NOT a codon

    Now :

    Place the cursor right before the RNA sequence GGUCGA… ( IMPORTANT)

    To understand the effect of the \G feature, try, successively, the 3 regexes, below :

    .*?GGU which matches the SHORTEST range of characters, till an amino-acid sequence GGU (\u\u\u)*?GGU which matches the SHORTEST range of TRIPLETS, till an amino-acid sequence GGU \G(\u\u\u)*?GGU which matches the SHORTEST range of CODONS, till a GGU codon

    Notes :

    The first regex matches any range of capital letters, whatever its size, followed with the first string GGU

    The second regex matches any range, containing 3*n capital letters, followed with the first string GGU ( n >= 0 )

    The third regex matches any range, containing 3*n capital letters, followed with the first string GGU, separated, from the beginning, by 3*m capital letters, so the GGU sequence is a codon ( n and m >= 0 )

    Similarly, try these 3 regexes below :

    .*GGU which matches the LONGEST range of characters, till an amino-acid sequence GGU (\u\u\u)*GGU which matches the LONGEST range of TRIPLETS, till an amino-acid sequence GGU \G(\u\u\u)*GGU which matches the LONGEST range of CODONS, till a GGU codon

    Notes :

    The first regex matches any range of capital letters, whatever its size, followed with the last string GGU

    The second regex matches any range, containing 3*n capital letters, followed with a last string GGU ( n >= 0 )

    The third regex matches any range, containing 3*n capital letters, followed with the last string GGU, separated, from the beginning, by 3*m capital letters, so the GGU sequence is a codon ( n and m >= 0 )

    For further information, on that topic, refer to the links, below :

    https://en.wikipedia.org/wiki/Codon

    https://en.wikipedia.org/wiki/Start_codon

    https://en.wikipedia.org/wiki/Stop_codon

  • Ownership Model for pointer data?

    20
    0 Votes
    20 Posts
    887 Views
    xzaton jwX

    @Lycan-Thrope

    There may genuinely be some confusion, let me clarify, when I talk about ownership semantics, I specifically mean:

    Who is responsible for “cleaning up” any resource which must be “freed” after it has been “acquired”?

    Its part of all languages, whether is a GC, or done manually. It could be dynamic memory, or some I/O like a file or network port. All this stuff about it being related to OOP is nonsense, but I can see why you thought that because RAII is an excellent way to handle it.

    As an example, look here: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-formatmessage

    Literally an example of passing ownership of a buffer in the win32 API.

    And listen man, programming is hard and asking questions is ok because it gives people a chance to learn something new.

    Maybe you should save your comments about working everything out on your own for places other than a forum?

    And while im here, everytime you’ve used stackoverflow, you’re being a hypocrite, because if it isn’t you asking for help, it’s you benefitting from someone else asking.

  • Quick note taking function?

    2
    0 Votes
    2 Posts
    838 Views
    Alan KilbornA

    @Khosro-Neyestani

    You pretty much described how Notepad++ works by default, with the exception of a “hot key” to run it.

    How programs are run is more of an OS level thing, so Notepad++ (mostly) can’t help you with invoking itself.

  • how to remove line highlighting?

    3
    0 Votes
    3 Posts
    289 Views
    Alan KilbornA

    For your own benefit, though, consider why it is there, and why it might benefit you to keep it.

  • How to launch Notepad++ with new document open

    11
    0 Votes
    11 Posts
    2k Views
    PeterJonesP

    @Roman-Revell said in How to launch Notepad++ with new document open:

    But, my goal is to just have Notepad++ open so that I can paste some text or start typing. Opening in a new document saves me from also having to do ctrl+n or click the icon. Just a little more convenient as long as I’m already running a command or script, might as well have it do what I want.

    Create a file called “scratchpad.txt”. Have your batch file open notepad++ with that same scratchpad file every time you run that shortcut. QED.

    Or, better, pin a shortcut to your taskbar that opens notepad++ with that file, so you don’t even have to Win+R and type npp[ENTER]. QED.

    Or, better, always have a copy of Notepad++ running, with your scratchpad file always open. You can even put in your windows startup so it happens with you never having to manually run Notepad++. QED.

  • Auto completion dropdown look

    7
    0 Votes
    7 Posts
    367 Views
    Lycan ThropeL

    @Michael-Vincent ,
    I certainly don’t hate you. :)
    I liked the feature as I think I mentioned once I had trouble not knowing when I was developing the UDL package, which were which, and ended up shutting down the “Words” option, using Functions only. I may have to turn it back on now that I can tell what’s what now. :)

  • Ctrl + e and ctrl + shift + alt not working

    5
    1 Votes
    5 Posts
    3k Views
    Alan KilbornA

    @datatraveller1 said:

    Shift+Ctrl+B prints STX

    Note that in Notepad++ 8.5 and later, Shift+Ctrl+B is the default keycombo for Begin/End Select :

    2b334d5d-6653-4060-9de5-8038e03a71bd-image.png

    So this keycombo will no longer insert a STX character into documents when typed.

  • What parameter is Notepad++ using to open files

    4
    0 Votes
    4 Posts
    604 Views
    PeterJonesP

    @LtSlimFisherman ,.

    And moreover to the excellent points by @Ekopalypse and @Alan-Kilborn , having “Edit with Notepad++” not show up for a certain file or filetype in Windows Explorer in no way prevents the user from opening Notepad++ and doing File > Open or equivalent, and cannot prevent that.

    As they said, the only way to prevent the user from opening file.config.xml in Notepad++ is to set the permissions on the file so they cannot even read the file. If all you want is to prevent them from saving changes, then you just need to remove write permission for the user.

  • Editing User Dictionary

    9
    0 Votes
    9 Posts
    2k Views
    Bob SteinB

    @James-F-Pasquini I found the file at %appdata%\Notepad++\plugins\config\Hunspell\en_US.usr

  • User Dictionary location with DSpellCheck Windows Native Lib

    6
    0 Votes
    6 Posts
    1k Views
    Bob SteinB

    @ChelOis I found it in %appdata%\Notepad++\plugins\config\Hunspell\en_US.usr

    The first line of the file appears to be the number of words. But I didn’t edit that, so it may have fixed itself.

  • Basic search ("find") is broken - or did I toggle some setting?

    4
    0 Votes
    4 Posts
    357 Views
    PeterJonesP

    @R-W-0 ,

    Uncheck “match whole word only”: sign isn’t the whole word RequestSigningCertificate

    And to find a tab, either copy a tab from the document and paste it into your search field, or use \t with Extended or Regular Expression modes.


    edit: @mark-olson beat me by seconds!

  • NOTEPAD++ does not complete the REPLACE command.

    3
    0 Votes
    3 Posts
    209 Views
    Klaus TrybulK

    Thanks for the reply.
    I am going to check this.

  • How to make list of frequently used files?

    8
    0 Votes
    8 Posts
    426 Views
    Chuck RobertsC

    @Alan-Kilborn I got it. Thank you so much!

  • How to replace CR/LF within fields in a CSV file

    11
    0 Votes
    11 Posts
    9k Views
    guy038G

    Hello, @mark-yorkovich, @peterjones, @alan-kilborn, @lycan-thrope and All,

    Of course, the generic regex satisfies the @mark-yorkovich’s goal ! But if we try to think more deeply about the problem, the solution is almost obvious !

    Mark said :

    I have a CSV file with comma-separated fields, and double quotes for each field, except the first field which is an ID field.

    Thus, as a valid field is always surrounded by double-quotes, this means that the line-breaks which need to be replaced with a literal , must be :

    Not immediately preceded with a double-quote character

    AND

    Not immediately followed with a double-quote character

    Hence, the following regex S/R :

    SEARCH (?<!")\r\n(?!")

    REPLACE ,

    Untick all box options of the Replace dialog

    Select the Regex expression search mode

    Move to very beginning of your CSV file

    Click once on the Replace All button ( or several times on the Replace button )

    Best Regards,

    guy038

    P.S. :

    As explained in a recent post, do not use the simplified search syntax (?<!")\R(?!") !

    Of course, this method does not work if fields, near the line break, may not be followed / preceded with a " character !

  • 0 Votes
    5 Posts
    423 Views
    mark LossM

    @Alan-Kilborn said in Can I create a macro that gives the desired file name when creating a new file?:

    @andrecool-68 said in Can I create a macro that gives the desired file name when creating a new file?:

    but the file name will always be “new 1”.

    I don’t think that’s going to always be true. It would depend upon if you already had an existing new 1 file when this macro is run, then I don’t think what the macro will saw will be saved in new 1.
    For this kind of automation it is probably best to go with the scripting plugins (e.g. PythonScript) or presumably NppExec can also achieve it.

    thanks my issue has been fixed.

  • Launching Lua

    6
    0 Votes
    6 Posts
    1k Views
    Alan KilbornA

    @PeterJones said in Launching Lua:

    $(FULL_CURRENT_PATH)

    I never remember this kind of stuff, so…

    I have a Run menu command – saved as NPP $(XXX) vars echo (file info) – that gives me an example when I need it:

    cmd /c echo FULL_CURRENT_PATH=$(FULL_CURRENT_PATH) CURRENT_DIRECTORY=$(CURRENT_DIRECTORY) FILE_NAME=$(FILE_NAME) NAME_PART=$(NAME_PART) EXT_PART=$(EXT_PART) && pause

    Sample output:

    18606e33-597c-498d-bf1c-e0f62d2c08e9-image.png

    After running, I can copy the FULL_CURRENT_PATH – or whatever text – from the cmd window, so not only do I NOT have to remember the names, I never have to type them either.

    Later edit:

    However, I can’t actually echo the verbatim text $(FULL_CURRENT_PATH) to the cmd window, because Notepad++ will hijack that and replace it. This could be “fixed” (see https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9567) but perhaps doubtful that it ever will be.

  • SQL Code Folding

    2
    0 Votes
    2 Posts
    428 Views
    rdipardoR

    Notepad++ does not have built-in support for Microsoft Transact-SQL: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12610#issuecomment-1340297100

    That may change in a future release, but I would not hold my breath.

  • SurroundSelection sometimes hijacks shortcut Ctrl+Shift+2

    5
    1 Votes
    5 Posts
    311 Views
    rdipardoR

    Norton prevents extracting dll from downloaded zip).

    If anyone visiting this thread is in similar circumstances, AppVeyor artifacts will be online until about MAR-28-2023:

    SurroundSelection (patched) x64 SurroundSelection (patched) Win32
  • Why [A-Z] = [a-z]?

    6
    0 Votes
    6 Posts
    322 Views
    Lycan ThropeL

    @Bahaa-Eddin-ツ ,
    Nah. You’ll hardly even remember it once it sinks to the bottom of the new posting queue. :)