• How could one use a spell checker for a portable Notepad++?

    7
    0 Votes
    7 Posts
    554 Views
    CletosC

    Okey, thank you very much!

  • How to right mouse click File Open from current directory

    8
    1 Votes
    8 Posts
    3k Views
    Alan KilbornA

    I suppose I should have mentioned above that the script will work with filenames/paths that include spaces, whether or not the filename is wrapped in double-quotes (the typical way to refer to Windows names with embedded spaces.

    Some additional examples of what will work (the I character is included to show a reasonable right-click/caret point):

    I am some text with c:\folder with spaceIs\file with spaces.txt a filepath right in the middle of me And of course wrapping in double quotes works "c:\foldeIr with spaces\file with spaces.txt" too Even without spaces you can have other text directly adjoining the name |c:\teIst1\test2.txt| Even other characters directly adjoining will work c:\test3\tIest4.txtzzzz (opens test4.txt – presuming test4.txtzzzz / test4.txtzzz / test4.txtzz / test4.txtz all don’t exist – if any did, they’d be opened before test4.txt )
  • How to increase font-size of marked text by 1 pixel?

    8
    0 Votes
    8 Posts
    3k Views
    mpheathM

    @Claudia-Svenson said in How to increase font-size of marked text by 1 pixel?:

    I need no zoom to view the text but I need to increase font for PRINTING it.
    Any solution for that?

    PythonScript plugin might help to make printing with a preferred text size easier.

    # https://community.notepad-plus-plus.org/topic/23039/faq-how-to-install-and-run-a-script-in-pythonscript/1 from Npp import editor, notepad def doPrint(): lang = notepad.getLangType() if lang == LANGTYPE.TXT: STYLE_DEFAULT = 0 STYLE_LINENUMBER = 33 # Set print size PRINT_SIZE = 10 # Get current sizes default_size = editor.styleGetSize(STYLE_DEFAULT) line_size = editor.styleGetSize(STYLE_LINENUMBER) # Set print sizes editor.styleSetSize(STYLE_DEFAULT, PRINT_SIZE) editor.styleSetSize(STYLE_LINENUMBER, PRINT_SIZE) # Print the doc notepad.menuCommand(MENUCOMMAND.FILE_PRINT) # Restore sizes editor.styleSetSize(STYLE_DEFAULT, default_size) editor.styleSetSize(STYLE_LINENUMBER, line_size) else: notepad.messageBox('Language type {} not setup for printing'.format(lang)) doPrint()

    PRINT_SIZE is set to 10 for printing and will restore to previous size after print is done.

    This is just setup for text files which only have default style 0. Other language types may have many styles and might be complex to setup for printing.

    PythonScript configuration can set the script as a toolbar icon for quick access.

    Tested with XPS document writer as have no actual printer.

  • Plugin Load Failure in Notepad++ Portable 64-bit on Select Systems

    5
    0 Votes
    5 Posts
    883 Views
    BernoulliBoxB

    Problem solved! Thank you for nudging me in the right direction.

    I used the ProcessMonitor app to inspect the DLLs loaded by both the 32 bit and 64 bit versions of NPP and its plugins during startup, and could see that the difference between them was that the 64 bit version (only) failed to load VCRUNTIME140.DLL which is needed by apps and plugins built with Microsoft Visual Studio.

    I had actually installed the redistributables earlier, suspecting this problem. However; the ‘gotcha’ that caught me out is that I had failed to note that Microsoft has separate Microsoft Visual C++ Redistributables for 32 and 64 bit architectures…

    So, after installing the 64 bit version of the redistributables (as well as the previously installed 32 bit one), NPP and the NpOpenAI plugin both work as they should!

    Interestingly, ‘Dependencies’ didn’t spot this. I may have been using it incorrectly.

  • Search and Replace - Remove specific IP ranges

    2
    0 Votes
    2 Posts
    600 Views
    Mark OlsonM

    What you say you want doesn’t quite match what you appear to want, based on your before and after.

    In any case, this should work:

    go to the find/replace form (Ctrl+H assuming normal keybindings) set the Search Mode to Regular expression

    Find what: (?-i)(?:\b(?:(?:172|12[78])\.|ff?e)\S*,\x20*)|,\x20::1
    Replace with: nothing (leave that box empty).

    You’ll have to hit the Replace All button twice.

    This isn’t really a particularly clever or complex regular expression, although it may appear daunting. Some notes:

    the (?-i) makes the regex case-sensitive the (?: and matching ) are just grouping parentheses that don’t capture the \b matches a “word border” (that is, the border between a word character and a non-word character) \S* matches zero or more non-whitespace characters \x20 matches a normal space character.
  • Align Questions in One line.

    8
    0 Votes
    8 Posts
    1k Views
    Martin MartinM

    @PeterJones said in Align Questions in One line.:

    (?-s)^\u+).+\K\R(?!\u))(?!ANSWER)

    I don’t know how to express gratitude on the internet. But BIG THANKS. YOU SAVED ME A LOT OF TIME.

    Really. THANK YOU.

  • How to Find

    3
    0 Votes
    3 Posts
    316 Views
    Mr. Math ExpertM

    @Alan-Kilborn said in How to Find:

    (?-is)\bto\x20+\w+?ly\b

    Thank you, perfect.

  • cant read greek

    4
    0 Votes
    4 Posts
    1k Views
    John ConantJ

    @PeterJones Thank you for sharing this excellent answer with detail and links, very proactive and anticipatory!

  • Baffled by \R vs \r\n in Find: expression?

    10
    1 Votes
    10 Posts
    2k Views
    Hank KH

    @PeterJones
    Thanks for the GREAT explanation, will read manual again and experiment.
    You and Alan have a GREAT DAY !!
    Cheers, Hank

  • 0 Votes
    4 Posts
    271 Views
    bruce oliverB

    Now Fixed THANK YOU so very very much… YEA!!! have a good day.

  • Copying selected text with mouse+ctrl no longer works.

    3
    0 Votes
    3 Posts
    642 Views
    B

    @Alan-Kilborn

    Thanks, Alan. You’re a star!

  • 0 Votes
    5 Posts
    768 Views
    Joachim MüllerJ

    @Alan-Kilborn
    Cool! Thank you :)
    I will try :)

  • Macros dissapeared

    10
    0 Votes
    10 Posts
    1k Views
    Wolf GangW

    Had this exact problem.
    I just updated n++ using the built-in updater (to 8.6.2) and all my macros are gone, I had created 5… shortcuts.xml are empty (with defaults in them).

    39b3660e-2cd8-4860-9139-3c46893d29b5-image.png

    Also like 30 of previous entries in “Find what” drop down menu are gone… So now it makes really difficult to create my macros.
    6faaa499-db53-4e7c-be98-f7b4e77fd312-image.png

    Very disappointed…

    I use duplicati to make backups of notepad++ daily… And it seems macros were not even saved. I just restored from Notepad++/cloud folder and the file content is just the default one.

  • Regex - Finding Invalid Characters in HTML Tags

    8
    1 Votes
    8 Posts
    1k Views
    Sylvester BullittS

    @guy038 Wow. I feel like I’m sipping from a fire hose! I bow to far greater experience than mine. Here’s the regex I finally chose:

    (?-si:<(?:title|figcaption|h[1-6])>|(?!\A)\G)(?s:(?!</).)*?\K\xAD

    I like your idea of using the \xAD for the soft hyphen: It clarifies what the regex is doing!

    I ran the regex it against my entire Web site (16,000 HTML files), and it works perfectly.

    I’ll be the first to admit I don’t fully understand why it works, but I can’t argue with success. I’m going to have to study it for a while, but it now has a permanent home in my toolbox.

    Thanks for taking the time to look at this thorny issue!

  • Same line spacing with other view

    6
    0 Votes
    6 Posts
    843 Views
    CoisesC

    @PeterJones said in Same line spacing with other view:

    I haven’t been able to find a way to send a message to Scintilla (the library that Notepad++ uses for the doing the editor commands) to change the height of individual lines.

    “All lines of text in Scintilla are the same height, and this height is calculated from the largest font in any current style. This restriction is for performance; if lines differed in height then calculations involving positioning of text would require the text to be styled first.“
    https://www.scintilla.org/ScintillaDoc.html#TextRetrievalAndModification

  • collapse specified xml-Tags on file opening

    2
    0 Votes
    2 Posts
    463 Views
    PeterJonesP

    @HConBike ,

    In native Notepad++, no.

    If you installed the PythonScript plugin, then a script could be written (and run every time a file is opened with the specific extension you specified) to search for the Fonts block and fold that level.

  • Accidental open

    8
    1 Votes
    8 Posts
    520 Views
    mkupperM

    @Alan-Kilborn said in Accidental open:

    But clearly OP was having trouble getting rid of it.

    That’s part of what seems like the bug I mentioned earlier. I started to write up the issue but it is turning into a long post plus I realized there were hints in the github issues that it has been reported, so I’ve parked the bug report it pending review, testing, and thinking.

    If someone does Ctrl+Tab or Ctrl+Shift+Tab to bring up the document switcher and you then while holcing Ctrl down you type Esc to exit document switcher the Ctrl+Esc or Ctrl+Shift+Esc are sent to Windows. Ctrl+Esc brings up the start menu and Ctrl+Shift+Esc activates task manager. That’s issue one.

    If you then switch back to Notepad++ you’ll see the document switcher dialog box but can’t get focus onto it other then via the mouse. Thus the box can appear to be stuck in the way. That’s issue two. The document switcher dialog box is model which means Notepad++ itself is locked up. It’s not a crisis as you mouse click within the box and it’ll activate the tab you happened to select via the dialog box.

    You can also trigger the second issue’s behavior by Ctrl+Tab and while holding the Ctrl key down you click on the task bar to bring another application the foreground. When you switch back to Notepad++ you’ll be moderately stuck with the document switcher. It turns out that pressing and then releasing Ctrl will clear the document switcher.

    github issue 10950 seems to describe what I saw but at the time that issue was raised it also seemed to be intermittent or hard to reproduce.

  • Select all marked text

    15
    0 Votes
    15 Posts
    9k Views
    Tomasz SałekT

    @Coises said in Select all marked text:

    In quoting you, it appears that you meant your regular expression to be ^\d+/\d\t; but it didn’t come out that way, because the asterisks were interpreted as signaling italics and the backslash before the forward slash was dropped (which you may or may not have intended).

    Right. This supposed to be ^\d+\/*\d*\t. Thanks for an advice.

  • Search Just Within Provided Line Number

    14
    1 Votes
    14 Posts
    499 Views
    Alan KilbornA

    @guy038 said in Search Just Within Provided Line Number:

    I don’t understand because, in my post, I do NOT speak about deleting the 2 digit, at any moment ?

    Ah…you’re right. I supposed I was confused because when you said:

    Leave the Replace with: zone Empty

    It appeared to me like this was setting up a replace-with-nothing aka delete operation!

  • Difference in display between Win11 Notepad and Notepad++

    3
    1 Votes
    3 Posts
    2k Views
    B

    @PeterJones Oh, so it’s actually a super simple issue. Thank you!