• 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
    819 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
    997 Views
    Robin CruiseR

    @guy038 great answer, thanks !

  • Using MACRO's to Copy a Tab to Another Tab & Change Data in the New Tab

    2
    0 Votes
    2 Posts
    694 Views
    EkopalypseE

    @ThatGuy-Steve

    I would say it depends.
    In general, yes, you can make 6 copies of a file and iterate through them. Whether you can achieve your goal depends on what you then want to do next.

    Open Npp without any files open before.
    Open the xml of your choice
    Now press the following

    ctrl+a ctrl+n and ctrl+v (6 times) ctrl+1 back to origin xml ctrl+pagedown for next tab make the changes, preferable by using shortcuts instead the menu.
  • 0 Votes
    15 Posts
    358 Views
    Ramanand JhingadeR

    @Terry-R The second * had to be within the bracket!

  • Settings aren't being saved after I close Notepad++

    4
    0 Votes
    4 Posts
    357 Views
    PeterJonesP

    @amadeogarcia ,

    So, yes, you are in local configuration mode, but your executable is in the Program Files hierarchy, which is sometimes write-protected. If you don’t have IT department restrictions, you should be able to change the permissions of the directory and xml files in D:\Program Files\Notepad++ to allow you write-access.

  • 0 Votes
    6 Posts
    514 Views
    LingEdL

    @PeterJones can’t believe I didn’t think of that. Thanks!

  • Preventing "TEST" + {TAB} from being auto-completed into "TESTING"

    2
    0 Votes
    2 Posts
    176 Views
    PeterJonesP

    @Dean-Lesner ,

    TEST{TAB} does not autocomplete to TESTING on a fresh unzip of v7.9.5-64bit (portable) or in my standard install of v8.1. In the portable 7.9.5, I installed the DSpellCheck and its en_US dictionary, and that didn’t change the behavior. (I tried the DSpellCheck, just because you mentioned it, but its spellcheck dictionary is not used for Notepad++'s auto-completion, and I don’t think that DSpellCheck itself hooks into the auto-completion feature of Notepad++.)

    The only way I can replicate your problem in this setup is if there is the word TESTING someplace else in the document, but not the word TEST.

    Thus, either you have non-standard settings somewhere, and/or you have some other plugin that is influencing the auto-complete. If you show us your ? menu’s Debug Info, as well as a screenshot of your Settings > Preferences > Auto-Completion, and we might be able to offer insight (that will tell us not only your exact version of Notepad++, but also what plugins you have installed)

    AFAIK, there is no way to remove a specific word from the auto-completion list, because the default just uses words in the current document, and words specific to the current lexer (programming language)

    Workarounds:

    You could type TEST{ESC}{TAB}, which will take you out of auto-completion mode before hitting the TAB You could use Auto-completion settings, and change the #-characters to something 5 or higher (so that TEST isn’t enough characters to trigger auto-completion) You could use the Auto-completion settings to turn off word completion (either by selecting Function Completion, or by unchecking Enable auto-completion on each input)
  • Help with Regex replace in one step

    5
    0 Votes
    5 Posts
    292 Views
    Ramesh G 0R

    The directly level does vary for every URL. I will work on your direction and see if I could solve. Appreciate your help.

  • remove number over four un json

    7
    0 Votes
    7 Posts
    438 Views
    Pouemes44P

    i have made this on you model, which seems to work

    search

    (?<=\d\.\d{4})\,

    replace

    ,
  • Find text and add text in new line

    2
    0 Votes
    2 Posts
    590 Views
    PeterJonesP

    @GG ,

    FIND = abc(\R|\z)
    (find abc followed by either a newline or the end of the file) REPLACE = abc\r\nxyz\r\n
    (the \r\n is a newline sequence in windows EOL mode) Search Mode = regular expression
  • Tab Size, Tab Font, and Tab Background Color Problem

    8
    0 Votes
    8 Posts
    3k Views
    Troglo37T

    @PeterJones said

    I didn’t say that the three Active Tab styles were disabled. I said that the Background Colour on the Active Tab text style was disabled.

    Sorry about that. I misunderstood.

    @Troglo37 also said,

    If changing the background tab color, changing the tab font size, and tab size don’t currently work, should a bug report be filed?

    No. Because it’s working as designed and documented, so it’s not a bug. You could make a feature request to add foreground colour and/or font face/size settings to those three… but it’s not a bug, so don’t call it a bug report.

    Thanks. I made a feature request. I hope I filed it correctly. Here’s the link. https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10070

  • Change fot globally

    3
    0 Votes
    3 Posts
    187 Views
    PeterJonesP

    @seenabhattaram ,

    Notepad++ is not a Word Processor. It is a text editor

    Plain text files (.txt, and source code) don’t have a font embedded in the file. Individual text-reading applications can be used to view/edit text, and they can each can be configured to display the underlying text with whatever font they want.

    With Notepad++, you do that using Preferences > Style Configurator. Select Global Styles from the left pane, and Default Style from the middle pane; set the font size and color you desire as your default font on the right.

    This is all documented in the online usermanual, in the section on Global Styles. There is a link to the Notepad++ Online Document in the ? menu inside Notepad++, which takes you to that site.

  • How to remove blank spaces after a particular phrase

    3
    0 Votes
    3 Posts
    839 Views
    Vf DvrV

    Great, thanks Peter.

  • Add suffix only to bookmarked lines

    3
    0 Votes
    3 Posts
    2k Views
    Vf DvrV

    that works! thanks Terry.

  • Save of automatic opened files shows wrong path

    4
    0 Votes
    4 Posts
    260 Views
    Alan KilbornA

    @Hans-Stangl

    I’m glad you clarified, because there is no way that anyone would have derived the info in your second post from the info in your first post.
    The bug I was thinking of (and mentioned earlier) doesn’t apply to this situation.

    So I duplicated (mostly) your scenario and I do understand that things go “wrong” here.

    I tend to think of it as a problem-between-keyboard-and-chair.
    Should you really rename a directory when you have files open in that directory?

    Some programs protect you nicely from this kind of thing (shown here for a folder, not a file):

    f9d08ab7-7485-4048-896f-44d4466829d8-image.png

    I suppose Notepad++ could do a better job of protecting you from the exact problem you noticed…

    But I’d probably advise you to just NOT change the name of a containing folder when you have files open in that folder.

  • 0 Votes
    9 Posts
    5k Views
    Stewart Gordon 0S

    @aks2161989 I think what actually happens is that the auto-updater tries to launch the installer, but it fails. It should give an error message but for some reason doesn’t. I find myself manually launching it using the ‘Run as administrator’ option.

  • Read-Only does not work

    7
    1 Votes
    7 Posts
    2k Views
    Alan KilbornA

    @PeterJones said in Read-Only does not work:

    How does this phrasing look for clarifying what the two menu entries actually do?

    Phrasing looks good; thanks for your efforts.