• Tab cessions

    3
    0 Votes
    3 Posts
    213 Views
    PeterJonesP

    @1-conscience-0-dimension ,

    It could be nice to have … session manager…

    Notepad++ already natively supports sessions¹: File > Save Session… and File > Load Session… allow you to save and load any session files you want.

    However, one feature you mentioned was

    with a menu to delete unwanted files entries

    The native session handling does not allow you to pick-and-choose which tabs end up in a session file. However, the session files are XML-based, so once the session file is saved, you can open it as a text file, and delete any unwanted entries from the session file, and save the file. The next time you Load Session, it will not include the extra tabs².

    There is a plugin called Session Manager that may have more features of use to you: go to the Plugins menu, Plugins Admin entry, and install Session Manager. I don’t use named sessions much, so I don’t know all the features of that plugin, but if you’re regularly using sessions, I’ve heard it’s a good improvement.

    -----

    Official sessions docs @ https://npp-user-manual.org/docs/session/ . As of 2020-Dec-02, the npp-user-manual.org version of the session docs is rather scant. There is an improvement coming soon, which can be viewed on github while waiting for it to be published.

    Caveat: when you File > Load Session…, it will add all the tabs from the session file to the current instance of Notepad++: it doesn’t automatically close other files, so you may have to File > Close All if you only want the session’s tabs open and don’t want other tabs to stay open.

  • 0 Votes
    4 Posts
    425 Views
    Nick BrownN

    Below is a Python Script, which will change ALL occurrences of Damage to 50% of their value,:

    import xml.etree.ElementTree as ET def is_float(value): try: float(value) return True except: return False root = ET.XML(editor.getText()) for damage in root.findall(".//Damage"): if damage is not None and damage.text is not None and len(damage.text) > 0 and is_float(damage.text): value = float(damage.text.strip()) * 0.5 damage.text = "{:.6f}".format(value) editor.setText(ET.tostring(root))
  • remove part of line

    5
    0 Votes
    5 Posts
    436 Views
    Alan KilbornA

    @cisco779k

    You have asked several regex data transformation questions on the forum. Give us all some “tanxs” by putting in the effort to learn why @astrosofista 's technique worked on your data, so that in the future you can maybe solve this type of problem (a fairly simple one) without coming here for help.

    Some nice resources are found HERE.

  • Please reinstate support for URL protocols

    3
    1 Votes
    3 Posts
    299 Views
    subz390S

    Wow ok this looks good, thank you for the pointer to the post.

  • help reg-ex

    5
    0 Votes
    5 Posts
    281 Views
    cisco779kC

    many tanxs (again) for your explanation!

  • How to remove a language from a srt file?

    2
    0 Votes
    2 Posts
    363 Views
    rinku singhR

    .srt + .srt + video file is a video with subtitle of text multiple language
    you can not delete a language with npp
    use MkvToolnix capture-20201129-175550.png

  • Create local XML and XSD files can be evaluated successfully

    1
    2 Votes
    1 Posts
    7k Views
    No one has replied
  • remove duplicate urls

    7
    0 Votes
    7 Posts
    2k Views
    Terry RT

    @guy038 said in remove duplicate urls:

    Am I missing something obvious ?

    I made no assumptions about the list, I just wanted to keep the order that did exist in reverse. The OP had pivoted my solution suggesting it worked for them.

    Terry

  • $(CURRENT_DIRECTORY) is np++ directory

    5
    0 Votes
    5 Posts
    605 Views
    BGM CoderB

    Thanks! That clears things up for me. I’m a bit richer now!

  • Poor-man's "regex favorites" in Notepad++

    4
    3 Votes
    4 Posts
    2k Views
    Alan KilbornA

    @guy038 said in Poor-man's "regex favorites" in Notepad++:

    Your search regex|(*F)\Q REPL:Your replacement regex

    Nice, one Guy!
    I’d like the original (?#...) one better, because it is more readable (once one knows that it is a “comment”), except for the problem I noted with the closing parens.
    Because of that limitation, |(*F)\Q is definitely better here.

  • Marked text manipulation

    50
    1 Votes
    50 Posts
    53k Views
    dinkumoilD

    @Alan-Kilborn said in Marked text manipulation:

    Copy and cut of selected text would jam all of the text together if it were on a selection basis (probably not really useful that way).

    Yes, you are right. Up to now, I’ve used my script only for deleting and editing the selections. But especially being able to multi-edit all occurences of a search term or overwrite them by multi-paste vastly increases productivity.

  • "Count" number of matches

    4
    0 Votes
    4 Posts
    5k Views
    Alan KilbornA

    I had a thought that it might be valuable to better state the precedence of options that I mentioned earlier. Let me give it a go, in the form of a pseudocode flowchart:

    Count option rules: if "In selection" is ticked Count will be occurrences within the selected text (of a single, non-column-block) selection else if "Wrap around" is ticked Count will be occurrences within the entire document else if "Backward direction" is ticked Count will be occurrences from the start of document to the (main) caret else Count will be occurrences from the (main) caret to the end of the document

    The use of “(main)” is important if you have multiple carets active at once (i.e., multi-editing enabled).
    You only have one “main” caret, which is the most-recent one you created.

  • Split lines in n characters completing whole words in Notepad++

    8
    0 Votes
    8 Posts
    528 Views
    astrosofistaA

    Hi @Terry-R

    You’re right, my bad. I misread the whole thing. Hope that OP wasn’t fooled by my post.

    BR

  • Perl subroutine calltips - with PythonScript

    52
    2 Votes
    52 Posts
    4k Views
    Michael VincentM

    @Ekopalypse said in Perl subroutine calltips - with PythonScript:

    Just to make clear, this function is not really needed.

    That worked!

  • Request for a new command line switch --singleInst

    4
    0 Votes
    4 Posts
    345 Views
    pbarneyP

    @PeterJones

    It was a wishlist item and my wishlist doesn’t trump pressing needs. Too often the perfect is the enemy of the good.

    I don’t know what’s involved in ongoing Notepad++ development, and whether it would have been a, “hey, good idea, I’ll whip that together in 10 minutes and be done with it” or if it would be, “hmm, we’ll put together a committee to do a needs analysis prior to committing it to the product roadmap and tasking several developers to develop the unit tests and blah blah blah.”

    Either way, my life is 90% workarounds, so I’m fine with it.

  • Updating version looses cached documents in the editor.

    3
    0 Votes
    3 Posts
    219 Views
    PeterJonesP

    @Justin-Tolearn said in Updating version looses cached documents in the editor.:

    I don’t know if this is a common behaviour I’ve not noticed before, but all documents that were in the previous version of the editor but NOT saved, were lost.
    Is this normal?

    It’s not common/normal, but we have heard instances of that before, so it’s not unheard-of, either.

    As @Alan-Kilborn said, anyone who tries to upgrade any software package without saving any active work first is just asking for trouble.

  • 0 Votes
    6 Posts
    345 Views
    Jerry O'BrienJ

    @Ekopalypse Thanks. I removed and reinstalled XML Tools and that fixed it.

  • 0 Votes
    2 Posts
    206 Views
    PeterJonesP

    @JasonJDooley ,

    You already asked that and I already answered.

    If you need more help, reply in the other thread.

  • Backtick javascript strings in Notepad++

    6
    0 Votes
    6 Posts
    1k Views
    caryptC

    ok , ty for guidance.

  • Help , can't shut off Transparency ?

    2
    0 Votes
    2 Posts
    161 Views
    vmars vernonV

    Hmm…
    Don’t know what I did , but now it works .