• A RegEx question - How to remove a line, including the \r\n? Thanx,

    6
    0 Votes
    6 Posts
    9k Views
    bob_diebelB

    @PeterJones Thanx a bunch. Much appreciated

  • multi line editing

    25
    0 Votes
    25 Posts
    6k Views
    PeterJonesP

    Submitted update as PR#254

  • 1 Votes
    16 Posts
    4k Views
    Alan KilbornA

    …OR…

    Train yourself such that whenever you are tempted to use * (from your command-line thinking), to use .*? instead – a rough regex equivalent, meaning: match 0 or more of any character, minimally. The “minimally” part is there mainly for safety. But of course this is just a rough guide, as things go deeper than that.

    BTW, this is all similar for ? – this is different in regex than it is on the command line as well.

  • How do you choose a specific value between a csv

    3
    0 Votes
    3 Posts
    235 Views
    artie-finkelsteinA

    Assuming it’s a regular CSV file I’d:

    select the lines to be copied from use the “\TextFX\TextFX Edit\E:Line up multiple lines by (,)” option carefully check to make sure TextFX didn’t get confused by commas inside the quoted fields; it may not get confused, but if it did get confused STOP NOW and undo (Ctrl-Z) the alignment option (or throw away this edit session) use Alt-‘left click’ and drag to mark the source block Ctrl-C to copy the block into the clipboard paste the block in the clipboard to wherever you want it optionally undo (Ctrl-Z) the alignment performed on the original tab
  • Android analog?

    2
    0 Votes
    2 Posts
    242 Views
    PeterJonesP

    @Lisa-LePome ,

    Sorry, recommending text editors that aren’t Notepad++ isn’t really the focus of this Forum.

  • 0 Votes
    2 Posts
    278 Views
    PeterJonesP

    @Antisomniac said in N++ used to save sessions on shutdown without fail. Now it fails about half the time.:

    Checking to see if this is a known issue or whether it’s more likely an issue with Windows, etc

    I have never seen the active session get clobbered, so that it opens without remembering the current session. Ways to mitigate:

    Don’t use multiple instances of Notepad++ open at the same time – that is, make sure Settings > Preferences > Multi-Instance is set to ☑ Default (mono-instance), and don’t use the -multiInst command-line option. Notepad++ only has one default session, and when you have multiple instances open at the same time, then it saves the session and other settings for whichever instance you happen to close last – this might clobber the default session.xml compared to what you hope it would be. Use File > Save Session to manually save the Session to a named session; if you lose your default session again, you can manually File > Load Session to get it back. Unfortunately, this won’t help with unnamed files, but at least it won’t forget what other files you have open. Use View > Project Panels to create one or more Projects which define sets of files that are grouped in your mind, to be able to easily access them. Again, this won’t help with unnamed files. Use Settings > Preferences > Backup and uncheck ☐ Enable session snapshot and periodic backup; once you do this, every time you exit, if you have unsaved files (whether edits to named files, or new unnamed files that haven’t been saved yet), Notepad++ will ask you to save each of the files, and this way you avoid the root cause of “I don’t think to save the file anywhere” Use Plugins > Plugins Admin to install the AutoSave plugin, then configure it (see my notes in this recent discussion I am linking here, where it shows the default AutoSave config, and explains how to change it in order to make it actually do the auto-saving) – used properly, this can help you avoid “I forgot to save the temporary file”-syndrome. Teach yourself to “Save Early, Save Often”. And if you use external backup software, version control, and/or cloud services, you can have external locations where you data is backed up so that if something does go wrong, you don’t lose too much data.
  • 0 Votes
    5 Posts
    261 Views
    Ramanand JhingadeR

    @Terry-R Terrific, it worked perfectly. For your information, I used this in the “replace” field: <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"><tbody><tr><td align="left" valign="top"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 18px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; display: inline ! important; float: none;">-</span></td><td align="left" valign="top"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 18px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; display: inline ! important; float: none;">$1</span></td></tr></tbody></table>

    @guy038 I have other such, similar strings (>- and <br></span>) which is why I needed a RegEx.

    I believe that other people will search online and find this “solution” which is why I am making time to post a reply.

    Thanks @Terry-R and @guy038 for your help and time!

  • Two Recent Changes/Bugs/Issues (don't know for sure)

    2
    0 Votes
    2 Posts
    328 Views
    artie-finkelsteinA

    check the setting for “Lock (no drag and drop)” in the ‘Tab Bar’ group of the \Preferences\General menu

    sorry, I don’t use open as workspace, maybe someone else can help

  • Notepad ++ Crashed when I open a file while it's running a Regex

    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • find in files with regular expression doesn't show result if only 1 hit

    2
    0 Votes
    2 Posts
    170 Views
    Alan KilbornA

    @hub-kurvers

    How about showing a demo of that, where you provide specifics?
    Some test data, the actual regex used, that kind of thing?
    Otherwise, I don’t think anyone will be able to help you.

  • Interrupted list

    13
    0 Votes
    13 Posts
    492 Views
    Dumitru S.D

    Hi to all!

    Thank you a lot for your very comprehensive response.
    I appreciate it.

    Have a nice day today!
    Best regards,
    Dumitru

  • Closed one of my old tab in Notepad++

    4
    0 Votes
    4 Posts
    160 Views
    PeterJonesP

    @Siddharth-J ,

    Scan the directory that you mentioned. the filename will be based on the original file “name” (new 1 or whatever it was) plus some timestamp.

    In the next rev of the online User Manual, this will be more explicit:
    012a6da3-be5c-4421-9c14-3b1dbf289786-image.png

  • How to copy a column with 1.5M lines.

    5
    0 Votes
    5 Posts
    2k Views
    Alan KilbornA

    @Michel-Vincent said in How to copy a column with 1.5M lines.:

    Can you guide as to where I should put the macro?

    There are other macros in shortcuts.xml (unless you’ve deleted all of them).
    You’d insert something new after the last </Macro> line in the file.

  • Open Folder as Workspace... fails to do anything

    3
    1 Votes
    3 Posts
    2k Views
    Waqas AhmedW

    Thank you @David-Ornelles I was able to solve the same problem following your reply. “The left margin was dragged all the way to the left, hiding the “Folder as Workspace” tab. Carefully dragging the inner edge of the left border towards the right made it visible again. No one’s fault but my own.”

  • Can't undo after saving file

    2
    0 Votes
    2 Posts
    164 Views
    nileplumbN

    Seems to be related to saving in with an active compare open via the compare plugin

    https://github.com/pnedev/compare-plugin/issues/248

  • How do I replace a block of text with another ?

    13
    0 Votes
    13 Posts
    5k Views
    TroshinDVT

    @Scott-Nielson said in How do I replace a block of text with another ?:

    @Alan-Kilborn and @PeterJones I saw that Npp has something about creating a template. How do I create a template that I can add or use for multiple files?
    I want the template to have some CSS and JavaScript (which I’ll skip adding here since I think it is unimportant to type all that) at the top apart from these meta tags:-

    Adds the possibility to add code snippets to the current document by selecting them from a simple list.
    Author: Frank Fesevur
    Homepage: https://www.fesevur.com/nppsnippets

  • Integration of a script writen in Python

    27
    0 Votes
    27 Posts
    5k Views
    PeterJonesP

    @PeterJones said in Integration of a script writen in Python:

    People who want to do more advanced actions,

    Also, people who want to do more advanced actions read the manual that’s included with PythonScript plugin, which says quite explicitly in the Npp Module section of the Introduction:
    7e4e64b7-c0ad-4c1e-a365-bae5284f8e38-image.png

    Honestly, beginners, not just people moving on to advanced topics, should have also at least read the whole introduction.

    The manual was quite explicit: if you want to write a module (a new file) that is called from someplace else (which is exactly what you do when you import your script into startup.py), then you need to include the from Npp import * inside your module.

    We’ve told you. The manual has told you. Good luck.

  • Foreign character cannot display in pop up window Notepad++

    7
    0 Votes
    7 Posts
    780 Views
    PeterJonesP

    addendum: I don’t know whether WINE mimics the Win7 or Win10 settings dialogs and registry, but https://www.askvg.com/tip-how-to-change-fonts-of-menus-dialog-box-and-other-text-in-windows-8-and-later/ explains how to change system dialog fonts in Win7 and Win10.

  • Help with dark mode.

    3
    0 Votes
    3 Posts
    9k Views
    PeterJonesP

    @Matheus-Bitencourt ,

    Was yours an upgrade, or an install? Did you run the installer as Admin, or was it as your normal user?

    Because under some circumstances, the themes (including the default dark theme “DarkModeDefault”) do not get properly installed in %AppData%\Notepad++\themes 🛈. If you go to Settings > Preferences > Style Configurator, click on the Select Theme drop-down, and look for “DarkModeDefault”. If it’s not there, you will have to copy the DarkModeDefault.xml to the right place; there should be a copy at <install directory>\themes\DarkModeDefault.xml, and if you have a normal installation, copy that to %AppData%\Notepad++\themes\DarkModeDefault.xml; otherwise, see “Configuration File Location” in the online usermanual for other possible locations.

  • Regex: How to find a duplicate tag on consecutive lines?

    9
    0 Votes
    9 Posts
    965 Views
    Robin CruiseR

    @guy038 great answer, thanks !