• Wrong manipulation help

    3
    0 Votes
    3 Posts
    230 Views
    Clément BerguerandC

    @PeterJones said in Wrong manipulation help:

    @Clément-Berguerand ,
    By default, Notepad++ enables the Settings > Preferences > Backup option for session-snapshot-periodic-backup, which only keeps a temporary backup copy to keep unsaved changes, it’s not a true “backup”, and it goes away when you hit SAVE or CLOSE in Notepad++
    Notepad++ has an additional feature “backup on save” available in the same Preferences dialog, which will create filename.bak or similar every time you hit SAVE. But if you didn’t already have that option enabled, it won’t help you now, and there’s nothing that Notepad++ can do for you. If you did already have that option enabled, there should be a .bak file next to your saved game, or in the “custom backup directory” listed in the Preferences dialog. (Notepad++ doesn’t enable that option by default because when the developer tried, a plethora of users complained about too many .bak files being created that they didn’t want. I argued in favor of data safety, but don’t-create-.bak-files-by-default crowd won that argument.)
    For future data safety, I highly recommend reading our backup features and autosave plugin FAQ, and set things up to make it less likely that you will lose your data.
    If your data is lost, that FAQ does mention a potential piece of software (not officially recommended or endorsed, other than some users have had luck with that tool) that can help recover deleted files.
    Good luck.

    Thank you very much. I’ll try to do it.

  • How Np++ handles char count?

    8
    0 Votes
    8 Posts
    2k Views
    pintassilgoP

    Thanks for all the replies. Byte count looks good enough for me, there is already a dedicated plugin to more refined statistics like count chars and words, for statusbar I believe byte count is enough.

    However, the other editor I’m talking about (CudaText) doesn’t use Scintilla, it has its own editing component (ATSynEdit) that doesn’t use simple buffer storage to retrieve byte count, it has “list of lines” according to the dev so the count would be slow.

    An optimization is possible by caching the size of each line, adding them up and then updating with edit events (typing one char sums 1…). But at the moment he don’t plan to work on it because it’s not that trivial as the editor supports multiple carets, multiple selections ans so on.

    Just adding, other text editor I have installed here, Kate, displays not only chars count (precisely, not bytes) but also count of words in statusbar. However these counts aren’t instant, I can see they wait for like half a second without change in the text to update. Clearly it’s done this way because it’s not that cheap to be done instantly.

  • add characters

    4
    0 Votes
    4 Posts
    510 Views
    Mr SchnokM

    Hello @guy038

    Thank you very much. It works very well.
    And especially thank you for the explanation.

    Have a nice day.
    Phil

  • Installation does not wait for completion

    1
    0 Votes
    1 Posts
    135 Views
    No one has replied
  • How can i bulk change this

    5
    0 Votes
    5 Posts
    959 Views
    Michael VvM

    @PeterJones thanks man, you helped me a lot!

  • Replace html tag with regular expression

    2
    1 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Linh-Việt ,

    So, you want to replace any <article-title> with <chapter-title>, but only when inside a <type="book"> .... </type> pair, and not between other types, like <type="journal">...</type>?

    That sounds like a job for FAQs > Generic Regex > Replacing in a specific zone of text , where you could use:

    Find Regex FR = article-title> Replacement Regex RR = chapter-title> Begin Search Region BSR = <type="book"> End Search Region ESR = </type>

    Using those values in the bold “variables” in the regex shown in that article, you would get:

    Find What = (?-si:<type="book">|(?!\A)\G)(?s-i:(?!</type>).)*?\K(?-si:article-title>) Replace With = chapter-title> Replace All will convert the text for you. (doing multiple Replace commands won’t necessarily work, because of the way that \K works)

    BTW: thanks for formatting your example data correctly. It helps us make sure we read your data correctly!

    ----

    Useful References Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Plugin admin and compare plugin removed after update notepad++

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Subhash-Sheladia ,

    You updated to a version that’s 1.5 years old? /me shudders to think how old your from version was.

    If you see a bug like Plugins Admin missing, a good idea is to try updating to the newest version (v8.5, released over the weekend) and see if the problem is fixed. If downloading the newest doesn’t work, please give us a recursive directory listing for c:\Program Files\Notepad++\ (using dir /s "c:\Program Files\Notepad++\" from a command prompt).

    But if you were really updating from a version that old, then the old Compare plugin you used to have would not be compatible with the modern Notepad++, so v8.1.1 may have disabled it. If you can successfully install v8.5 and see Plugins Admin again, then you will see that Plugins Admin lists both Compare 2.0.2 and ComparePlus 1.1 – ComparePlus is the replacement for Compare, and will work better on modern Notepad++ going forward, so I highly recommend installing that.

  • Data parser/import?

    24
    0 Votes
    24 Posts
    5k Views
    V.MelnikV

    @guy038
    Thank you again @guy038
    But I decided this at the stage of preparation of the “B” file, by replacing it

    . </p>

    on

    </p>
  • Python: Multiple files ANSI to utf-8 converter

    9
    0 Votes
    9 Posts
    4k Views
    PeterJonesP

    @Mark-Olson ,

    Note that this doesn’t use Notepad++ for anything,

    I appreciate your willingness to help. However, we need to focus this Forum on Notepad++. If it’s something that can be done in PythonScript, and you are interested in providing the solution, please make it compatible with PythonScript. This forum isn’t for “generic” Python code-writing.

  • How can I replace all lines with given text?

    3
    0 Votes
    3 Posts
    647 Views
    PeterJonesP

    @Luis-Piña-III

    To replace an entire line, you will want to combine the regex concepts for “anchor to beginning of line” with “match 0 or more of any character” then “anchor to end of line”. The Online User Manual Searching/Regex section linked below will help you quickly find those concepts" (search for “anchor” and “any character” and “0 or more”)

    The replacement is just the text you want it to be replaced with.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Help replacing a portion of a word

    4
    0 Votes
    4 Posts
    261 Views
    Vince LandryV

    @Mark-Olson Thank you so much!

  • Are seperate installation files for the Compare plugin?

    3
    0 Votes
    3 Posts
    243 Views
    Kathi WK

    @Michael-Vincent Thank you I will go there!

  • Minimize notepad++ to tray instead of closing.

    26
    0 Votes
    26 Posts
    10k Views
    Alan KilbornA

    @PeterJones said in Minimize notepad++ to tray instead of closing.:

    They just fixed it. I wonder what prompted them to notice and fix that issue.

    I think a developer was working on a batch of translating issues, and just gathered that one into the batch.

  • EML as supported file language style

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

    6
    0 Votes
    6 Posts
    34k 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
    978 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
    932 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
    567 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
    3k 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
    419 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. :)