• Can I see the modified datetime of opened documents?

    4
    0 Votes
    4 Posts
    1k Views
    Alan KilbornA

    @Nick-Minchin

    Hopefully you took to heart some discussion about unnamed/unsaved documents and potential data loss. IMO an unnamed file should be saved into the file system with a real name very soon after creation.

    comparing unsaved changes to the original document

    The new ComparePlus plugin may be of interest to you for such a task.

  • Find multiple strings in a directory

    8
    0 Votes
    8 Posts
    2k Views
    Francisco SimarroF

    @PeterJones

    Thanks for your clarification. Sorry for to present the question in this forum.

  • How to replace a specific term adding/replacing a incremented number?

    6
    0 Votes
    6 Posts
    272 Views
    WatashiW

    It worked, thanks a lot

  • Background colors since 8.4.5 upgrade of Notepad++

    2
    0 Votes
    2 Posts
    573 Views
    PeterJonesP

    @Kevin-Cook ,

    When you have Dark Mode enabled, could you show us a screenshot of Settings > Preferences

    For example, for me, Dark Mode looks exactly like I’d expect:
    4d17cd39-a44e-4b27-8606-927fcfb23e9a-image.png

    Also, share your Settings > Style Configurator dialog screenshot, maybe with Global Styles > Default Style selected, like:
    9f6507f5-1d9f-4d9d-a086-8dc581eef9dd-image.png

    You also said,

    playing with Settings -> Style Configurator … Disabling Global styles

    “Global styles > Global override” with the overrides checkmarked is almost never what you want. A well-designed theme will properly inherit from “Global Styles > Default Style”, and should be reasonable for most users. (I know you said you have vision issues, and there are rare circumstances when vision issues will require checkmarking some of those overrides… but that should be a last resort.)
    bd4924a2-ffa1-4123-8951-4ff38ccdc43c-image.png
    Using those overrides will mean there is no syntax highlighting… or, even worse, if you do it wrong, will mean that there is partial syntax highlighting, which might make things worse than if you’d just left the overrides off.

  • Exit Python loop when replacement count is 0

    7
    1 Votes
    7 Posts
    367 Views
    M Andre Z EckenrodeM

    @Alan-Kilborn said in Exit Python loop when replacement count is 0:

    A modification to that one could be to limit the matches that research() will look for to 1, e.g.:

    Noted, and I like it. Thanks again.

  • Silent install.. how to activate "Plugins admin"

    2
    0 Votes
    2 Posts
    223 Views
    Stefan PendlS

    @incarnare
    no, since it must not be activated.
    Can you post more details what you want to do?

  • Disabling clicking beyond end of line

    7
    0 Votes
    7 Posts
    2k Views
    willb2022W

    @Alan-Kilborn, actually I don’t recall enabling that. Either I fat-fingered it by accident, or it was enabled by the previous user before I acquired this computer. In either case, unchecking it solved the problem.

  • All files are showing up as symbols in Notepad++

    Locked
    7
    0 Votes
    7 Posts
    3k Views
    PeterJonesP

    “GandCrab” malware hasn’t really been active since 2019. Since this forum is dedicated to Notepad++, not to general computer safety and solving virus/malware infections, I don’t know that we really need to be adding any more links years after the fact.

    This topic will be locked as “off topic”

    To future readers:

    If you found this post because you were searching the internet for solutions for GandCrab infections, my best advice to you is to look in places other than a discussion forum focused on a specific text editor: this Community Forum in general, or this topic in particular, will not become a link farm to list every possible site to help you. I’d suggest moving on. If you are a Notepad++ user, and like the person who started this topic, you suddenly start seeing all your files turn into .crab files: this isn’t Notepad++'s fault: you have been infected with malware, and the Notepad++ Community are not the experts to help you remove said infection.
  • Having trouble getting a macro to work as desired

    4
    0 Votes
    4 Posts
    213 Views
    Alan KilbornA

    @PeterJones said in Having trouble getting a macro to work as desired:

    put the example text in the same kind of text box you used for the macro XML

    I was going to add that in my reply, but I suspect OP doesn’t really know how he obtained that nice boxed-in formatting for his macros, so telling him to “do that again” may be pointless. :-)

    But here’s how it happened:

    He copied+pasted full lines from shortcuts.xml and because those lines have leading whitespace, the forum software thinks it is code and puts it in a nice code block.

    Probably any sample text the OP provides would not have that characteristic, and would need manual formatting to get the proper result.

  • Insert a new line text after a line containing specific text

    3
    0 Votes
    3 Posts
    1k Views
    Charles CarmichaelC

    @Charles-Carmichael Thanks very much for this and also the guidance on how to post real data, shows you how much of a novice I am. Thanks again

  • Regex replacement of text within regex find

    3
    0 Votes
    3 Posts
    246 Views
    guy038G

    Hello @nick-minchin, @alan-kilborn and All,

    Here is the road map for this S/R :

    Open your file in Notepad++

    Go to the very beginning of this file ( Ctrl + Home )

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?x-si) ( ^ \h* "formatter":\x20+"function | (?!\A) \G ) .*? \K " (?!$)

    REPLACE '

    Un-tick all options

    Select the Regular expression search mode

    Click on the Replace All button ( Do not use the Replace button !)

    Voila !

    This S/R will replace any non-trailing double quote ", only after the string "formatter": "function, with a simple quote ', in all the lines of your file

    Best Regards

    guy038

  • NppEventExec to github

    2
    0 Votes
    2 Posts
    182 Views
    PeterJonesP

    @millu-jorge ,

    That plugin is new to me. But it seems to hook NPPN_* events and run NppExec scripts.

    So, you would need to make an NppExec Script that will commit your project to GitHub – probably something that did a commit to your local repo, and a push to the GitHub repo. And then you could then hook the NPPN_FILESAVED event to call that NppExec script.

    To do anything beyond that would require you to write the scripts that do the git/github actions you desire, and then figuring out which NPPN_* event best matches when you’d want that to.

    You can look my NppExec + SVN examples below, and base your git scripts on those. However, I highly suggest investigating the Better Idea first:

    Better Idea

    I would recommend looking at the GitSCM plugin instead: that probably has all the functions you would want/need, without having to figure out a script for each of them, or hassle with hooking them to the right events.

    NppExec + SVN examples

    Personally, for my subversion-based version control, I have four NppExec scripts, which commit the current dir, commit the current file, add the current dir, and update the current dir. And I just entries in my contextMenu.xml (Settings > Edit Popup ContextMenu) that call those scripts, so I do it manually rather than on triggers. But even knowing that they can be done on triggers, I doubt I would do them, since not all my files are in subversion control, so I don’t want it trying to run the “commit” script every time I save a file that isn’t in subversion.

    if you want to use my svn scripts as templates for the same concepts that you would use for git, I will include them below. However, you will not want to do the NPP_SAVE command in each if you are going to be triggering off of the NPPN_FILESAVED event, because that will cause an infinite loop

    ::Svn-Commit-Dir NPP_SAVE cd "$(CURRENT_DIRECTORY)" INPUTBOX "SVN commit $(CURRENT_DIRECTORY)" : "Message: " : cmd /c svn commit -m "$(INPUT)" cmd /c svn update ::Svn-Commit-File NPP_SAVE cd "$(CURRENT_DIRECTORY)" INPUTBOX "SVN commit $(FILE_NAME)" : "Message: " : cmd /c svn commit "$(FILE_NAME)" -m "$(INPUT)" cmd /c svn update "$(FILE_NAME)" ::Svn-Add-File NPP_SAVE cd "$(CURRENT_DIRECTORY)" cmd /c svn add "$(FILE_NAME)" ::Svn-Update cd "$(CURRENT_DIRECTORY)" cmd /c svn update .

    (and no, I will not rewrite those to work for git/github for you. the concepts you need are all there, and translating those concepts to git will help you learn the tool.)

  • Can't find INI file

    4
    0 Votes
    4 Posts
    1k Views
    Larry SchwartzL

    @Larry-Schwartz
    My apologies for the confusion. I want to modify the configuration file that controls what file attributes are shown when EVERYTHING displays its file list. I use NPP as my text editor. I should be asking this question in the EVERYTHING forum. Again, my apologies for taking your time.

  • XML File - Create an element and get a value from existing attribute

    10
    0 Votes
    10 Posts
    1k Views
    Alan KilbornA

    @Software-Support said in XML File - Create an element and get a value from existing attribute:

    The value 2.92 will be appeared as 2

    Well, for exactly that situation, you’d want to change the \d+ appearing in the original Find expression to \d+\.\d+, I guess…

    But this gets into a bigger topic of how to match floating point numbers as well as integers.

    And that really isn’t a Notepad++ topic, so patience with such questions wears thin. Suggest you follow the link I provided before about regular expressions.

  • PIC did not displayed

    2
    0 Votes
    2 Posts
    224 Views
  • Notepad for tablets

    2
  • Python Script toolbar button moves after execution

    5
    0 Votes
    5 Posts
    467 Views
    deleeleeD

    @PeterJones said in Python Script toolbar button moves after execution:

    So I don’t know what it might be.

    Ok, thanks anyway Peter. Always appreciate your input. Hopefully someone will know what’s causing it.

  • File encoding detection issue

    3
    0 Votes
    3 Posts
    1k Views
    Alan KilbornA

    @Артём

    Keep an eye on this THREAD. Hopefully I am soon finishing up the script I’ve worked on to “solve” that very similar issue.

  • Set line width from pull down menu

    5
    0 Votes
    5 Posts
    992 Views
    Tom OsbeckT

    Think I’m finally getting there. Thank you Peter and, for now, over and out.

  • Run -> Send via Outlook not working

    3
    0 Votes
    3 Posts
    1k Views
    PeterJonesP

    @Marek-Šanoba ,

    How old is your shortcuts.xml ? The Send Via Outlook was commented out in v7.6.3 in 2019, and those comments were removed completely in v7.9.3 .

    That said, you are allowed to have whatever commands you want in your run menu, so you are allowed to keep the ancient outlook /a "$(FULL_CURRENT_PATH)" command if you want it. However, as with any program run from the command line, if it’s not in your PATH, you need to provide a full path to the outlook.exe executable. I have a working Outlook installation on my work laptop, but if I drop to cmd.exe or powershell and try to run Outlook from the command line by just typing outlook.exe, I get the error 'outlook.exe' is not recognized as an internal or external command, operable program or batch file. . This is the equivalent command-line message to the ShellExecute ERROR that you quoted.

    For my new work laptop, with a clean installation of Outlook, outlook.exe is not in the PATH, so neither the command line nor Notepad++'s Run command can find it. But if I set Notepad++ > Run > Run… to "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE" /a "$(FULL_CURRENT_FILE)", it will attach the saved copy of the active file to an email using outlook – please note the quote marks.

    So you need to find your path to the outlook executable. (Probably something similar, though I’m guessing you have a sensible 64bit outlook at "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE", but that is just a guess)