• Help: recover last save

    2
    0 Votes
    2 Posts
    190 Views
    PeterJonesP

    @Luca-Fonte ,

    Unfortunately, it’s likely lost – when a computer loses power, it doesn’t give applications a chance to do their “safe shutdown” routine, and Notepad++ might not have been able to finalize what it was trying to do when the computer lost power. However, our save/backup FAQ does have a section on “my unsaved files are missing” – you can try the suggestions in that section, but understand that there might not be anything we or Notepad++ can do to recover your data. As a result, I highly recommend you read and understand that whole FAQ, so that you can help yourself prevent such data loss in the future.

  • ComparePlus Plugin Unavailable

    6
    0 Votes
    6 Posts
    786 Views
    Brian FlickB

    @pnedev & @mpheath thanks for confirming what version I will need for the NPP version I’m allowed to have installed. I hadn’t seen the info in the current plugin list, and @mkupper I didn’t see a pop-up when I started NPP. But now I’m going to try the portable version of NPP that I completely forgot was an option, and see if it will run on my locked down laptop.
    Thanks all for the quick responses.

  • How to use PythonScript plugin ?

    2
    0 Votes
    2 Posts
    197 Views
  • Run Only Selected Text with Python?

    4
    0 Votes
    4 Posts
    745 Views
    PeterJonesP

    @chigkim ,

    Then you need to learn how to run python code from a command-line argument instead of from a script. That’s a python question, not a Notepad++ question.

    The Notepad++ specific part of your question is how to access the selection in an NppExec script (or Run command), and you now have that information.

    Though I’ll thow you a fish: if you can figure out how to use Notepad++'s default plugins, then cHl0aG9uIC1jICJwcmludCgkKENVUlJFTlRfV09SRCkpIg can be easily decoded to hand you the answer. But any further questions about how to use python.exe are off topic here.

  • remove notepad starter entirely

    10
    0 Votes
    10 Posts
    1k Views
    kiroizo oscarK

    @bo-reddude said in remove notepad starter entirely:

    Double clicking on txt file opens notepad++ instead of notepad. I only use notepad++ for tradingview related coding and a few others, and this has been a big annoyance for me.

    This started with the latest update, I think? I don’t remember allowing this change to occur on my computer. And I ran the batch file notepad starter github posted, but it did nothing. Changing the file association within the notepad++ is not allowed and is greyed out with no way to edit it. Uninstalling the notepad starter plugin using plugin admin does nothing.

    Setting the files association by right clicking in windows and using “always use this app for this file” doesn’t work either.

    This is the worst update ever.

    What’s the solution to getting back to where it was. I just want the file association for the notepad++ to remain to only those extensions that I made up (*.pine for pine script). And I want the *txt to be associated with the windows notepad.

    Faced this this week after I had too many plug-ins working and too many files open in notepad++, it was taking too long to open.
    Uninstalled the plug in, deleted its .exe and just used wintools to clean its remnants from the registry.

  • 0 Votes
    2 Posts
    145 Views
    Travis Lee Bailey Moscow American Трэвис Ли БейлиT

    @Travis-Lee-Bailey-Moscow-American-Трэвис-Ли-Бейли

    I SOLVED IT:

    Guide:
    RegEx Cheat Sheet for Notepad++

    Using Regular expression I typed in first: [0-9][0-9]:[0-9][0-9]

    Then: [0-9]:[0-9][0-9]

    Leaving the replace, blank.

    Which replaced all of the numbers with nothing.

    I then typed in \R which deleted all of the paragraph marks

  • Line return

    4
    0 Votes
    4 Posts
    581 Views
    mkupperM

    @Sylvain-Jean, is this a Notepad++ question or a regular expression question? This forum’s focus is supporting the Notepad++ editor, and at times people have questions about Notepad++'s search/replace feature.

    If you are using using Notepad++ then you may be interested in the Generic Regex: Replacing in a specific zone of text article.

    However, I personally don’t think what you want can be done in a single search replace as you want to do several things.

    You want search/replace the string <property name="ServerLoginConfirmationText" value=" with nothing. You want to keep the string For in game information, be please to ask question to ingame admin You want to replace the comma-space that is after admin at the end of the previous string with a comma-newline. You then want to replace the spaces that follow comma or semicolon with a newline up until the " /> You want to replace the " /> with nothing.

    Before proceeding further, I suspect you should think more carefully about what you are asking for. That’s because while it can be done in two steps they are are rather specific to the example data you had provided:

    Search: (?-i)(?:<property name="ServerLoginConfirmationText" value="|" />)
    Replace: (nothing)

    The string is now: For in game information, be please to ask question to ingame admin, those are; XXXXX, YYYY, ZZZZZ and so we then deal with that using:

    Search: (?-is)(?-i:For in game information, be please to ask question to ingame admin|(?!\A)\G).*?\K(?-i:(?<=[,;])\x20)
    Replace: \r\n

    The latter expression is straight from the article I linked to above using (?-s)(?-i:BSR|(?!\A)\G).*?\K(?-i:FR) where

    BSR is For in game information, be please to ask question to ingame admin FR is (?<=[,;])\x20

    The BSR is longer than you’d think as you wanted to preserve the comma-space in that string.

  • Extracting multiple rows from text file based on a header row

    5
    0 Votes
    5 Posts
    254 Views
    Ross BrownR

    @Alan-Kilborn said in Extracting multiple rows from text file based on a header row:

    (?-i)(?-s)^.+?\R^AAA A {3}AA(?s).*?(?=^AAA|\z)

    Amazing, thanks! This is a real help

    I will learn it at some point, just need to find the time to invest in myself so I can see the benefits.

  • Notepad++ open in new instance because I use multiple desktops

    4
    0 Votes
    4 Posts
    7k Views
    Aryan FirouzianA

    One silly solution would be to drag a tab out off the notepad++ window, and then drag it to other desktop. That way you have two different notepad++ instances in different desktops

  • User defined language to highlight different parts of a line

    2
    0 Votes
    2 Posts
    190 Views
    Alan KilbornA

    @AndrewCliffordOrica said in User defined language to highlight different parts of a line:

    I just want different background colours

    You can’t reasonably do what you want to the background coloring.
    But you can do it, with a plugin, to the foreground coloring, see EnhanceAnyLexer.

  • Regex - Extract range of XYZ coordinates

    3
    0 Votes
    3 Posts
    287 Views
    DrBubblesD

    @Mark-Olson Thanks for your response, appreciate it! I’ll look into other options then. I can actually open the file in Notepad++ but it sure takes a while to load.

    Anyway, thanks again!

  • regex to move entire line in a specific line position in multiples file

    14
    0 Votes
    14 Posts
    673 Views
    Rockberto ManentiR

    @PeterJones said in regex to move entire line in a specific line position in multiples file:

    It’s because your file doesn’t end in a newline.

    Genius!!! Works great!!!
    many many many thanx!!! you rulez!

  • Edit with Notepad++ context menu missing from Windows 11

    5
    0 Votes
    5 Posts
    4k Views
    D

    I have overwritten the Pin function now because I was not able to get it to work with the other workarounds mentioned on the manuals page.

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\SOFTWARE\Classes*\shell\pintohome]
    “MUIVerb”=“Edit with Notepad++”

    [HKEY_CURRENT_USER\SOFTWARE\Classes*\shell\pintohome\command]
    @="“C:\Program Files\Notepad++\notepad++.exe” “%1"”

  • Macros disappear on v8.6.8

    6
    0 Votes
    6 Posts
    346 Views
    PeterJonesP

    @firstblackboy said in Macros disappear on v8.6.8:

    I’m not sure why it didn’t take it from the beginning, but alas it didn’t.

    My guess is you had some “bad data” somewhere in the XML. And by doing it in pieces, you avoided that bad data.

  • Sorting lines in multiples files at once

    2
    0 Votes
    2 Posts
    145 Views
  • Remove every other character

    4
    0 Votes
    4 Posts
    2k Views
    connor austinC

    @Alan-Kilborn this file i have the same one its from a game called “People Playground” and the Devs of the game made this file for people who know how to edit . JPG and they did this as a joke but despite this people were able to do this and see the image the file is modulo2.jpg if you want to know more about it just search up the file name and click on the first result.

  • 0 Votes
    2 Posts
    180 Views
    PeterJonesP

    @kavish-jha ,

    I’m a little confused by some of your description, so sorry if I’ve misinterpreted things.

    AppData, Cloud, -settingsDir, and doLocalConf are the only four solutions I know of. You are rejecting AppData (for reasons of being “temporary”, which doesn’t make sense to me, but I am sure you know the details of your system more than I can guess from a brief description); you are rejecting cloud data because you cannot put %UserName% variable in the path; presumably doLocalConf won’t work for you, because you don’t want everyone storing their settings in the same app directory.

    But some comments from me:

    Idea 1: -settingsDir might work, if you can create their shortcut and/or batch file that launches Notepad++: you could have that run "\path\to\notepad++.exe" -settingsDir="Windows Server - A1\Notepad++\%UserName%\" to launch Notepad++. As long as they always start Notepad++ with that shortcut/batch, rather than running notepad++.exe directly, it would get its settings from the right place. (If you have context-menu commands in regedit, you could maybe even edit the registry so it always includes the -settingsDir argument in the registry calls as well)

    Idea 2: Since the Cloud Directory won’t allow variables, could you have a script that runs when a user logs in that creates a junction? You could make the junction always named Windows Server - A1\Notepad++\ActiveUser , but it would point to the Windows Server - A1\Notepad++\%UserName%\ , so you could set Notepad++ up to always look at Windows Server - A1\Notepad++\ActiveUser , and the login script would take care of making sure that always points to the user’s actual preference directory.

    Idea 3: Instead of having a script creating a junction and using Cloud Directory, you could have a script which copies Windows Server - A1\Notepad++\%UserName% to %AppData%\Notepad++ , and then a log-off script that copies it back the other way to save their settings long-term – so even if the %AppData% is “temporary” over the long-haul, it will exist while the user is logged in, and thus you can just have Notepad++ look in %AppData%\Notepad++ as normal.

  • Regex - Hex Code Not Working as Expected

    9
    0 Votes
    9 Posts
    344 Views
    PeterJonesP

    @Sylvester-Bullitt ,

    But when I type the same string into the forum dialog, the soft hyphen doesn’t show as it did before

    That’s because soft-hyphen is a non-printing character, and the forum doesn’t display non-printing characters (because they have no glyph to display). As I said in my first reply, your original paste into the forum used a normal ASCII hyphen, which is why it was visible in the forum.

    [deleted post]

    I originally commented on your deleted post (yes, as a moderator, I can see it), but I decided to retract that part, because maybe you deleted it because you already realized what you did wrong.

    I’m going to have to shut down for the night

    Sounds like you need the sleep. I hope (by the time you read this) that you got it.

  • find a string and move to new line

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Sudhir0103 ,

    You don’t say what the “specific character” is, and there is no specific character in your example data. But if what you want is to convert space character followed by set to newline sequence followed by set (but only if set is a whole word, not the start of some other word like setting), an easy way to do that is:

    FIND WHAT = \x20set\b the \x20 means the space character; if you wanted, you could just type a space as the first character in FIND WHAT, but it’s hard to copy/paste unnoticed space character from the forum, so I use the escape sequence instead the \b is what keeps it matching set but not setting REPLACE WITH = \r\nset \r\n is the windows CRLF line ending. SEARCH MODE = Regular Expression Click REPLACE ALL

    There are other ways to do it, but this one is pretty easy for a regex (regular expression) newbie to understand

    (update: fixed from saying wrong \x32 to right \x20)

    ----

    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
  • Spellchecker not underlining errors

    2
    0 Votes
    2 Posts
    133 Views
    ronsipherdR

    @ronsipherd Never mind; I found that the English (United States) dictionary was missing.
    All better now. :-)