• Increment only bookmarked lines 1->1000

    3
    0 Votes
    3 Posts
    323 Views
    Mark OlsonM

    The Columns++ approach is a good one, and if your file isn’t several megabytes or larger, I would just stick with that and ignore the rest of this post.

    That said, you could get better performance on very large files using PythonScript, with the following script:

    import re x = [0] def on_match(m): x[0] += 1 return m.group(1) + str(x[0]) editor.setText(re.sub('(abc_)1', on_match, editor.getText()))

    Note that there’s a superficially similar script you could write with PythonScript that uses editor.rereplace instead of re.sub, but editor.rereplace will be much slower than re.sub for very large files.

  • 0 Votes
    8 Posts
    2k Views
    PeterJonesP

    Even better would be taking the freedom to select the checkbox once the user highlights a certain plugin name. A little aggressive, but serves in a beneficial way, plus, if the user does not want to select multiple plugin at once, he unchecks them.

    I wasn’t stating my opinion of what would be best. I was stating what is.

    If you feel strongly enough that it would change, you may read our FAQ about making a feature request and follow the instructions there to put a feature request in the right place.

    Personally, I feel that either implementation will be equally annoying to a similar-sized subset of the user base. If you’re going to annoy half the users either way, why not just leave it as is. But my stating my opinion in no way prevents you from maintaining your opinion or from making an official feature request.

    Addendum: Not everyone uses the mouse for everything, either. Imagine someone who has difficulty using scrollbars with a mouse, so they click on the name of the first plugin in the list, then use arrow keys to scroll down until they find the right plugin. Under the current implementation, they they hit spacebar on only the right plugin to mark the checkbox, and then use TAB or Alt+I to install that one plugin. Under your system, that initial click (and probably every arrow key, because every time you arrow, it highlights the next plugin in exactly the same way a click does) would actually checkmark the plugins as they were trying to navigate to the one they want. Now instead of installing one plugin, choosing Install would actually install at least two (the first, and the one they wanted) and maybe even all the ones in between (if there’s no way to distinguish between clicking on a plugin name and arrowing to a plugin name).

  • Use different metakey for multi-edit

    2
    0 Votes
    2 Posts
    173 Views
    PeterJonesP

    @tebiodl ,

    That is not currently an option, sorry. (You could put in a feature request, as described in our FAQ section, but I wouldn’t expect it to be changed)

    (Are you the same person as @supsm, and just thought you could “speed up” an answer to this earlier question by asking again from a new account? Or did the dice just roll really weirdly today that two completely random users happened to have the same complaint today?)

  • Multi-edit modes

    7
    3 Votes
    7 Posts
    545 Views
    zbrush zbrusherZ

    @mkupper Thanks for magical settings “noColumnToMultiSelect.xml”.

  • Slow to open large files...

    7
    0 Votes
    7 Posts
    2k Views
    PeterJonesP

    @AndersWa said in Slow to open large files...:

    N++ without Plugins is painfully slow editing large XML files.

    Which is why Notepad++ has Settings > Preferences > Performance, where you can define a threshold to stop doing things like syntax highlighting if a file is large enough that it slows down your editing.

  • File is not getting minified.

    3
    0 Votes
    3 Posts
    553 Views
    lokesh shindeL

    I tried the above solution and it works perfectly. Nicely explain with screen shot.Thank you so much for your help. Really grateful.

  • Must-Have plugins, what are yours?

    15
    4 Votes
    15 Posts
    32k Views
    mkupperM

    @Barry-Patterson said in Must-Have plugins, what are yours?:

    I don’t see anyone mentioning the “NPP TextFX2” plugin.

    I suspect that’s because nearly all of the TextFX / TextFX 2 features are now built into Notepad++. Some accuse Notepad++ of then becoming bloatware.

  • 0 Votes
    6 Posts
    2k Views
    A

    @ADEYEMI-SAMUEL this works for me. Appreciated @Coises

  • How i can sort number from largest to smallest on notepad++

    26
    0 Votes
    26 Posts
    4k Views
    Alan KilbornA

    If you’ve used a script in this thread, you might want to double check your copy of it for a bug I’ve discovered.
    Look to previous postings in this topic thread where the script has been changed – find the text moderator edit (2024-Jan-14).
    There’s a link there that describes the bug in more detail, and shows what needs to be changed in an old copy (or you can simply grab a copy of the current version).

  • Random text in multiple files

    4
    0 Votes
    4 Posts
    2k Views
    Alan KilbornA

    If you’ve used a script in this thread, you might want to double check your copy of it for a bug I’ve discovered.
    Look to previous postings in this topic thread where the script has been changed – find the text moderator edit (2024-Jan-14).
    There’s a link there that describes the bug in more detail, and shows what needs to be changed in an old copy (or you can simply grab a copy of the current version).

  • Notepad++ forum articles FAQ tagged vs the FAQ category

    2
    1 Votes
    2 Posts
    1k Views
    PeterJonesP

    @mkupper ,

    Tags are up to the original poster who creates a given Topic, and are thus not guaranteed to be accurate – they are self-selected, self-reported, uncontrolled, and free-form. There is no way to prevent users from using inaccurate tags, nor of enforcing that they use only a controlled, limited set of tags, so it’s rather a free-for-all. As such, the moderators have chosen to not “police” the tags in general.

    For the “FAQ” tag, I agreed with you that it shouldn’t be on posts that are not in the official FAQ section (with the two “read before posting” being the intentional exceptions), so I did clear out the few extraneous “FAQ” tags that you pointed out to me in chat.

    Regarding tagging posts in the FAQ section: at various times, I have gone back and forth as to whether or not I should bother with them on the FAQ entries. I have never found tags useful in general (because of the free-for-all nature, and the fact that a search for contents of a post usually matches more and better posts that I’m looking for than does relying on the randomness of tags), and am not convinced that more people would find the various FAQs if only I’d tag them better. Adding a “FAQ” tag to them seems especially pointless because they’ve already been collected into one Category, which seems an easy enough way to make that grouping and to easily find them. If you feel strongly that the other half of the entries should have “FAQ” added, I can do that, I just doubt that it will be truly helpful.

    Regarding “Please Read This Before Posting” – I don’t like that I couldn’t use the same post in both categories, but the forum doesn’t allow that, so I’ve got two copies. And since there are two copies, the one-paragraph difference is intentional, because without it, some people have taken “General” to mean “talk about anything, even if it has nothing to do with Notepad++”, and that’s not what the Forum or that Category is for. And I don’t really see a point of a third copy, because if people don’t see it pinned at the top of General Discussion and Help Wanted, they aren’t going to see it in the FAQ Category page, either.

    update: additionally, every Topic is limited to 5 tags, so on some, I have to remove other tags to make room for a “FAQ” tag.

  • xconfig for Notepad++

    1
    3 Votes
    1 Posts
    243 Views
    No one has replied
  • Defining TAB stops at irregular positions in an UDL

    3
    0 Votes
    3 Posts
    262 Views
    CoisesC

    @PeterJones said in Defining TAB stops at irregular positions in an UDL:

    I am not sure how the elastic tabstops handles the uneven spacing…

    SCI_ADDTABSTOP — I believe this was added to Scintilla following work and lobbying by Nick Gravgaard, who originally proposed elastic tabstops.

    Support is bare. The stops must be added to each line independently, they are not remembered when switching tabs (and so must be reestablished when the tab is activated again), and adding them is slow. Print doesn’t get them right (I think it fails to account for the difference between pixels on the screen and pixels on the printer).

  • Editing (deleting) non-contiguous lines

    8
    0 Votes
    8 Posts
    531 Views
    Moe StarM

    Wow again!
    Great group and very helpful people!
    I will give it a go again with these tips.
    Thanks a bunch.

  • How to use SCI_GETTEXTRANGE in NppExec script?

    3
    0 Votes
    3 Posts
    289 Views
    Andi KiisselA

    @PeterJones ,

    Thanks for such a thorough investigation.
    Knowing that something is impossible is better than assuming it may be.
    The alternative with TARGET suits me very well, I’ll take it.

    Thank you!

  • Double-click on the bracket to select the text enclosed in brackets

    6
    0 Votes
    6 Posts
    3k Views
    Nidhal FlowgunN

    in autohotkey, create a script that sends Ctrl+Alt+b when you ctrl+click.
    This is just one of the scripts I use to help me code in Notepad++

    #If WinActive(“ahk_class Notepad++”)
    ;; Ctrl+LButton to select what’s between brackets/parentheses
    ~^LButton::
    keywait, LButton
    if (A_TimeSinceThisHotkey<150){
    send, {lButton}
    send, ^!b
    send, {Shift Up}{Alt up}{Ctrl up}
    send, {sc0E9}
    }
    return

    #If

  • Cannot add shortcut for "Duplicate Current Line"

    8
    1 Votes
    8 Posts
    409 Views
    R

    Thank you!

  • Select file with one click in Project Panel :

    5
    1 Votes
    5 Posts
    577 Views
    unal mkU

    @Alan-Kilborn said in Select file with one click in Project Panel ::

    @PeterJones said in Select file with one click in Project Panel ::

    For one-click switching, that might really annoy some people (like me), because some do a single-click on the filename to make sure it’s selected, then right-click to get the right-click menu, but don’t want to have that initial single-click immediately open the file or change the active file. So if you do end up requesting this feature, please make sure it’s an option to be single-click vs double-click, with the default in the double-click that people are used to.

    An additional “problem” for one-click: Sometimes, single clicks are “errant”, and big effects from such accidental clicks are annoying, because you then have to undo an action you didn’t intend in the first place.

    But if an selection option single/double click feature( like say PeterJones ) only for file switch no problem and make work easier .

  • Who to contact when can't remember login info from the past?

    3
    0 Votes
    3 Posts
    273 Views
    swegmikeS

    @PeterJones Thanks. I found the github login that was used and fixed the email.

  • Replace Unix timestamp

    11
    1 Votes
    11 Posts
    2k Views
    Thomas KnoefelT

    @Dr-N ,@Coises ,@PeterJones
    @guy038 said in Replace Unix timestamp:

    I think that your result 2024-01-04 19:39:53 exceeds the right answer of one hour !

    Thanks for pointing this out!

    Indeed, in my example, my local time zone has been automatically included into the calculation.
    In case it should be UTC ( which is one hour west of my location) this should be indicated by a “!” in the format string.
    So the Replace of my (two) Cature Group example should look like this .

    Previous example with local time zone (Thu Jan 4 19:39:53 2024):
    set(CAP1..os.date("%c", math.floor(CAP2/1000)))

    New example with UTC time (Thu Jan 4 18:39:53 2024):
    set(CAP1..os.date("!%c", math.floor(CAP2/1000)))

    Details are described here:
    Lua os.date description