• How to delete specific lines only with macro

    5
    0 Votes
    5 Posts
    197 Views
    Dominic LeblancD

    Thanks Guy, I really appreciate your help!

  • need to replace the pipe with / and remove the quotes in text

    6
    2 Votes
    6 Posts
    359 Views
    Thomas KnoefelT

    @Aj-Jarrard
    Or you can use MultiReplace Plugin to target specific columns and replace content only in these columns. … and you can even colorize your columns with that Plugin.

    2944b529-869d-4176-b624-e42423c475e4-image.png

  • DoxyIT on 64bit: Access violation

    5
    1 Votes
    5 Posts
    454 Views
    C

    @Clicketyclick Well I caved in and build myself a Python 2 script that does the job - for me at least. It’s available on my Github: clicketyclick.github.io/TipsAndTricks/Notepad++/Doxyit

  • Notes are getting deleted from Notepad++

    3
    0 Votes
    3 Posts
    309 Views
    EkopalypseE

    @Duty-Lead
    What version of Npp are you using?
    Can you post the debug information from the ? menu?

    Whatever i have written in notepad++, it is getting deleted after 4-5 days automatically

    What does that mean?
    The files are still there, but the contents have been removed? That would be very confusing!
    Or have the files disappeared? If so, which files are we talking about? Files that were backed up automatically?
    That is, that you did not save manually?
    I’m guessing you have software like CCleaner running that removes temporary stuff depending on the settings.

  • How do i unhide lines?

    15
    1 Votes
    15 Posts
    3k Views
    mkupperM

    @GrampaWildWilly The FAQ: Feature Request or Bug Report shows the best (and only) way to request and, or, to vote, on feature requests.

    On github I see six open issues when I search for “unhide” Unfortunately, most of the issues seem to be related to conflicts between hiding lines and other Notepad++ features.

    Maybe there’s an issue in there asking for just the ability to unhide a selection. I did not see it.

  • Help with find and replace

    4
    0 Votes
    4 Posts
    179 Views
    CoisesC

    @Terri-Willowkeep said in Help with find and replace:

    I doing something wrong?

    My guess is that you have Search Mode: Regular expression selected when you mean to have one of the other two options. A period in a regular expression matches any single character.

  • How to delete characters after certain number

    3
    0 Votes
    3 Posts
    145 Views
    Cristina MoiseC

    @Alan-Kilborn Can’t say in words how much I love you right now.You made my day !! So happy!Again thank you for your prompt answer.

  • Want to check spaces

    6
    0 Votes
    6 Posts
    793 Views
    Mampi BordoloiM

    @Mark-Olson Exactly what i mean. Thank you so much ❤️ for your help

  • Replace content between string that contains a specific word

    13
    0 Votes
    13 Posts
    601 Views
    Marius MasYM

    @PeterJones it is working good, thank you much

  • NPPExec: is it possible to detect if text is selected or not?

    3
    2 Votes
    3 Posts
    156 Views
    Mark OlsonM

    @pbarney

    If you want to detect if there is exactly one selection of nonzero length, do the following:

    Call SCI_GETSELECTIONS. If the result is greater than 1, there are multiple selections. Call SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND to get the start and end of the selection. If the end is greater than the start, the user has a single nonzero-length selection. As you correctly identified, you can then use SCI_GETSELTEXT to get the selected text, although in this script it doesn’t look like that’s really necessary.

    Based on a recent issue I saw with the JSON-Viewer plugin where incorrectly assuming that the user always had a single selection caused NPP to crash, I think that validating that there is a single selection is generally good practice,

  • How to setup „Default Directory” for all users?

    2
    0 Votes
    2 Posts
    377 Views
    PeterJonesP

    @Bil-Dos ,

    There is no “override all users” option. If each user has their own login on the computer, and each are running Notepad++ with a “normal installation”, then %AppData%\Notepad++\config.xml (🛈: in this case, probably c:\users\<username>\AppData\Roaming\Notepad++\config.xml) will be separate for each user, and the only way to override that is to edit/overwrite each individual config.xml. In a normal installation, Notepad++ doesn’t have a “central” location for the settings that get stored in the config.xml.

    If you install somewhere other than Program Files and set it to use Local Config (“Don’t use %APPDATA%”), then all users’ config would come from the same config.xml in the installation directory – but that would mean they’d all share all the Settings > Preferences and other such settings in common, which might not be what you want.

    But there is no way to set it so that some settings come from a central location and some come from their individual files

  • Search/Replace to delete a line???

    3
    0 Votes
    3 Posts
    117 Views
    Alan KilbornA

    @o2-zen

    Find: \R
    Replace: with nothing
    Search mode: Regular expression

  • Move to New Instance grayed out.

    6
    0 Votes
    6 Posts
    5k Views
    Yuval GrimblatY

    Remember to save your file first. Once saved, you’ll be able to transfer it to a new instance. This operation isn’t possible with unsaved files.

  • Still stuck in Administrator mode

    18
    1 Votes
    18 Posts
    3k Views
    EkopalypseE

    For future readers: The tip mentioned by @JohnWren disables the User Account Control feature.
    I strongly recommend NOT doing this, it has a purpose.
    That’s like removing the airbag from your car to save weight so you use less fuel?

  • replace / character after speciffic word

    3
    0 Votes
    3 Posts
    765 Views
    Vio VioV

    @guy038 said in replace / character after speciffic word:

    /(?=[^/\r\n]+&type)

    Thank you very much.work as needed.
    no,i don’t think other then words/numbers in password are used. just to make sure added some and used second option,worked as needed to.
    Thank you again,this topic can be closed.

  • How can I make the context menus visible in Dark Mode?

    8
    0 Votes
    8 Posts
    441 Views
    AsylumETA

    @AsylumET I have managed to correct the issue however I am not entirely sure what actually caused it. I was using one of Windows high contrast themes for accessibility reasons. When I updated NP++ to the lastest version something must have gone wrong during the setup which resulted in the odd colored menus. I now believe that this was the case because I just went into my theme settings and switched to a normal windows theme and the context menu showed normally. I then switched back to the high contrast theme and it still shows normally.

    So if anyone has a similar issue, try switching windows themes if even only for a moment just to get things to update correctly.
    Screenshot 2024-09-21 201318.png

  • regex to remove part of a line with variable words

    9
    0 Votes
    9 Posts
    371 Views
    Rockberto ManentiR

    @Coises
    thanks for all the answers and suggestions, and sorry for my rudimentary English.
    the text files are all .cue files for music flacs, and the lines where the phrase (Artist name cover) can be is always composed like this:
    Title “song (artist name cover)”
    of course song and artist name are variable but the word cover followed by the brackets and " are always at the end of the line.
    Thanks for all the help… and I will try to read Literal Text Blocks when I finish editing the 3500 cue files!
    Many thanks

  • changing the font

    4
    0 Votes
    4 Posts
    339 Views
    PeterJonesP

    @Snabel42 ,

    I have never seen a reason for the current order – and I just searched the historical repo issues to see if it was ever explained, and couldn’t find a mention of a reason.

    But global overrides have come up often enough recently that I finally took the time to put in a feature request to ask that Default Style be moved before Global override.

  • Help with a couple of Macros

    4
    1 Votes
    4 Posts
    219 Views
    Terry RT

    @Darkwood-Consulting said in Help with a couple of Macros:

    Move to the end of the next non-blank line

    I’ve come up with a revised version as the previous one looks like it failed when there weren’t any more “non-blank” lines in the file. So now the regex is:
    (?-s)(.+)?(\R+)?(.+)?\K

    So this is used in the Find function. Copy the red text above (the actual regex) and paste into the “Find What” field of the Find function. Have one of your files open and do a few tests by putting the cursor in various locations and clicking on “Find Next”. You need to test all possible scenarios you might encounter to be sure this will meet your needs.

    So once a regex has been found to work, next comes the step of recording the macro. Whilst I’m aware you already have some knowledge of how to record a macro, I’m not sure if you’ve got past the basics of recording a shortcut key combo. To record this macro, you would start the recording as you normally do, then either use the mouse to click on the “Search” menu item, then “Find” or use the appropriate shortcut key for “Find” of which the default is “Ctrl F”. You will see this alongside the menu option. If you have already done some tests a working regex will already be available. Just make sure it is listed in the Find What field. Click on “Find Next” and then click on close. At this point you can stop recording the macro, save and name it.

    To give a bit of background to the regex:
    (?-s) - DOT characters do not include carriage return/line feeds
    (.+)? - consume as many characters as possible on the current line, ? allows for an empty line
    (\R+)? - consume as many carriage return/line feeds as possible from the current position (which is the end of a line), ? allows for a non-empty line. After this the cursor will be at the start of non-empty line or end of file
    (.+)? - consume as many characters as possible on the current line, ? allows for an empty line/end of file position
    \K - forget everything selected and leave the cursor in the new position

    Terry

    PS, although you refer to a blank line, are you sure it is truly empty, not just containing some blank characters as that changes the solution. Good luck.

  • How to enlarge toolbar icons.

    2
    0 Votes
    2 Posts
    239 Views
    PeterJonesP

    @Giacomo-Margarito ,

    Pick one of the “large” choices in Settings > Preferences > General > Toolbar