• CTRL+DOWN/UP ARROW to move down/up to previous/next paragraph

    4
    0 Votes
    4 Posts
    305 Views
    Todd CarsonT

    @Todd-Carson said in CTRL+DOWN/UP ARROW to move down/up to previous/next paragraph:

    @Paul-Wormer Thank you very much, Paul. Yep, that works.

    However, for me, that’s totally non-standard for Windows. Is there a way to customise the keyboard shortcut to CTRL+DOWN/UP ARROW?

    (Please say yes!)

    Never mind. I found it. Thanks again.

  • Remove part of lines of text

    5
    0 Votes
    5 Posts
    2k Views
    mkupperM

    I interpret “I have a large number of text files which all start with a line as seen below” in that the afcad_path thing is always on line 1, or possibly is the first non-blank line.

    I would search for (?-s)\A\R*afcad_path =\K.+ and replace with nothing (blank) in regular expression mode.

    See https://npp-user-manual.org/docs/searching/#regular-expressions but in summary, (?-s) disables . matching newline (this is the default for most people and so (?-s) is redundant but is there just in case someone has . matches newline enabled), \A is the start of the file, \R* gobbles up the blank lines, if any, afcad_path = is the header string the OP is interested in, \K says to keep everything that has been matched so far (the blank line(s) and “afcad_path =” thing), and .+ wipes out the remainder of the line.

    If the file already starts with “afcad_path =” with nothing following, or does not start with a “afcad_path =” line then the search/replace will do nothing and the file is not modified.

  • Automated install not really installing

    2
    0 Votes
    2 Posts
    325 Views
    PeterJonesP

    @Jonathan-De-Carvalho ,

    I have no experience with remote installation, but I wouldn’t expect it to magically change Notepad++ over to the updated version while it’s actively running… and I’d actually be surprised if it could write the new notepad++.exe if the user were actively running the old notepad++.exe at the time.

    Could you do something like TASKKILL /IM notepad++.exe to forcefully kill the user’s Notepad++ instance? (if so, you might want to also send some message to the user before doing so, warning them that it’s about to happen, giving them a 30 sec pause so they can save their work before your taskkill, or similar.)

  • How to batch remove all lines after the nth line?

    4
    0 Votes
    4 Posts
    483 Views
    Alan KilbornA

    @melanievt

    Learn more to be able to apply such techniques on your own in the future; start HERE.

  • Increase counter

    5
    0 Votes
    5 Posts
    305 Views
    Daniel HolzmannD

    Thanks guys. I will go with litos81’s proposal which is working perfectly fine for what I need.
    The plug-in version I’d have considered for private purposes, but installing plug-ins on my work PC is always a big challenge for our IT department.

  • Removing multiple blank lines

    5
    0 Votes
    5 Posts
    518 Views
    Alan KilbornA

    @namx3249 said in Removing multiple blank lines:

    and why don’t use command from Edit - Line operations - Remove empty lines ?

    Because OP wanted a “single blank line” to remain after the operation.

  • UDL comment that requires seperators

    10
    0 Votes
    10 Posts
    593 Views
    Mark OlsonM

    I finally came up with a regex-replace that adds buffer spaces internally as well as externally, if you are interested.

    Replace (?s)(\S)?/\*((?!\*/)\S)?((?:(?!\S?\*/).)+?)?((?!\*/)\S)?\*/(\S)?
    with (?1\1\x20)/*(?2\x20\2)(?3\3:\x20)(?4\4\x20)*/(?5\x20\5)

    Just for the record, a lot of the complexity of that regex-replace is due to dealing with the silly corner case of replacing /**/ with /* */. You could absolutely come up with something simpler if you didn’t care about that.

  • Are hanging indents not possible?

    2
    0 Votes
    2 Posts
    212 Views
    CoisesC

    Settings | Preferences… | Editing | Line Wrap : Indent

  • Ending changing to Chinese GB2312

    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP

    @madara-san ,

    Please stop using generative AI to write your posts for you. It’s not helping anyone.

  • Please help me turn this off

    2
    0 Votes
    2 Posts
    224 Views
    PeterJonesP

    @Thành-Nguyễn said in Please help me turn this off:

    Please help me turn this orange column off. Thank you everyone!

    Read this FAQ to learn more about that feature: the feature is there to help you, not hurt you, but the FAQ explains how to disable it if you really cannot handle improved UI

  • How can I find the value to send to Notepad++ through send message.

    7
    0 Votes
    7 Posts
    600 Views
    asadMarmashA

    This is great! Thank you all for your comments and suggestions, and a special thanks goes to @Alan-Kilborn for providing the table.

  • How to see hex value of character next to cursor?

    26
    0 Votes
    26 Posts
    7k Views
    PeterJonesP

    @Jeff-Heath said in How to see hex value of character next to cursor?:

    I’ve followed the installing PythonScript Guide,

    FYI: that guide from 2019 was focused on the brief time when Notepad++ had just come out of a confusing update, and not all plugins (including Python Script) were yet compatible with the new Plugins Admin method of installing plugins. PythonScript v1.5, released in Oct 2019, was the first PS version compatible with Notepad++'s Plugins Admin interface… but that means that PythonScript has been available through the default interface Since Oct 2019. You no longer need to follow that ancient guide.

    update: sorry, apparently it wasn’t fully compatible until v1.5.1, also in October 2019; it was first listed in Plugins Admin in Notepad++ v7.8.1 – so from that point on, you don’t need to follow that outdated guide.

    f798369e-eab4-4bb7-9851-c17db123cd8e-image.png

  • Exportar e Importar Teclas de Atalho (ShortKeys)

    3
    0 Votes
    3 Posts
    269 Views
    Alan KilbornA

    @Tulio-Cezar said:

    Export and Import Shorcuts it’s pretty!

    @PeterJones said in Exportar e Importar Teclas de Atalho (ShortKeys):

    there are scripting solutions which can extract the current allocated shortcuts.

    But, alas, there are no solutions for, say, importing a file of data such that it sets up shortcuts for N++.

  • update notepad++

    10
    0 Votes
    10 Posts
    22k Views
    PeterJonesP

    @madara-san said in update notepad++:

    Your post is a combination of summarizing what had already been said above (including what was linked in the official User Manual), and misinformation. If you don’t have anything accurate and new to add, you might want to avoid posting it.

    Future readers, to correct mistakes made by @madara-san :

    Click on the “Help” menu in the top menu bar.

    No default translation of Notepad++ has a menu named Help. The menu is actually labeled with a question mark (?). To say otherwise only confuses newbies.

    If a new version is available, Notepad++ will prompt you to download and install it.

    “Check for Updates” will not always show a new version. As the manual explains (https://npp-user-manual.org/docs/upgrading/), until the developer triggers auto-update for a new version, no amount of “check for updates” will show that there’s a new version available, even if you can manually download a new version from https://notepad-plus-plus.org/downloads/ . The reasoning is described in the user manual. (For example, the website currently has through v8.5.2, but the last auto-update version that “Check for Updates” will see is 8.4.8.)

    Note that you will need to manually transfer any settings or plugins you had in the previous version to the new version after installation.

    That is false. The Notepad++ installer / updater does not delete your old settings from %AppData%\Notepad++ , and it does not reset them; any settings you had for a previous version in the standard location will still be in effect for the newly-installed version, unless you deleted the previous settings yourself.

    (The statement, while false for a normal installation, is misleadingly true for the portable version: true, in that unzipping a new portable zip into a new folder will obviously not keep your settings from some other portable or installed copy – that is rather the point of the portable, after all – but misleading, in that there is no “installer” if you are using the portable zip.)

  • Replace Lines from different files

    33
    0 Votes
    33 Posts
    4k Views
    Ted PlumT

    @guy038 those are changes made by me, manually :)

  • Copy each line of text to 2nd line and add text before and after

    3
    0 Votes
    3 Posts
    562 Views
    Jake StahlJ

    @Alan-Kilborn Thank you so much! I was searching for that kind of information but I’m pretty new to using Notepad++ and had no idea of what terms, etc. I was looking for. Thank you for the very useful information.

  • trim characters length of value after second comma

    10
    0 Votes
    10 Posts
    814 Views
    Lucius BalfourL

    @Terry-R Thank you so much, apologies for the late reply, but this really did help. Thank you for taking the time to help!

  • 0 Votes
    4 Posts
    658 Views
    Mark OlsonM

    If you’re talking about Folder as Workspace, then yeah, I don’t know a good way to do this. If you want a workspace that contains one or more folders and you want to hide files in that workspace, I suppose what you could do would be to export the workspace to an XML file, and then edit it with find/replace to comment out the files you don’t want.

    Relevant documentation is here for discussion of project panels and here for discussion of searching the project panel.

    Suppose I have a folder like this:

    C:\\silly: - foo.txt - bar.xml - baz.txt - quz.py Creating a project panel

    I go to View->Project Panels->Project Panel 1 (assuming you don’t already have a Project Panel 1).
    You should get a sidebar that looks like this:
    b7296eb4-9540-47af-8a7d-c2877996addf-image.png
    Right click the thing that says Workspace and select Add New Project. Now the sidebar will look like this.
    29803dde-ff74-464f-afbb-3c5cf047d6a9-image.png
    Right click Project Name and select Add Files from Directory... (not Add Folder. Yes, this is confusing). Add the folder of interest. I selected C:\\silly from the folder browser dialog and now my project sidebar looks like this:
    10cbed10-e779-4430-8a31-e0b597b8d323-image.png
    Go to Workspace->Save As... and save your workspace as an XML file.

    Excluding some files from your project

    Now open up the project’s XML file in Notepad++. It will have the following contents:

    <NotepadPlus> <Project name="Project Name"> <File name="C:\silly\bar.xml" /> <File name="C:\silly\baz.txt" /> <File name="C:\silly\foo.txt" /> <File name="C:\silly\quz.py" /> </Project> </NotepadPlus>

    Now find/replace in this file.
    Find: (?-si)(<.*name="[^"]*\.(?:txt|xml)"(?:(?!/>).)*?/>)

    txt|xml can be any |-separated list of file extensions you want to exclude, like txt (for just txt files) or py|md (for Python and Markdown files).

    Replace with: <!-- \1 -->.
    Regular expressions on

    Now the file will look like this:

    <NotepadPlus> <Project name="Project Name"> <!-- <File name="C:\silly\bar.xml" /> --> <!-- <File name="C:\silly\baz.txt" /> --> <!-- <File name="C:\silly\foo.txt" /> --> <File name="C:\silly\quz.py" /> </Project> </NotepadPlus>

    Now save this file and close Notepad++ then reopen Notepad++. You need to close and reopen because Notepad++ doesn’t save the association between the project panel file and the project panel until it closes.
    You should now find that the Project Panel will no longer show any .txt or .xml files.
    3fb80c5e-8fe0-43ac-a32b-37aa34ba6c51-image.png
    If you later decide you want to uncomment only XML files so that those are revealed in the workspace, you can do that by find/replacing (?-si)<!-- (<.*name="[^"]*\.(?:xml)"(?:(?!/>).)*?/>) --> with \1 (regular expressions on). Then your project file will look like

    <NotepadPlus> <Project name="Project Name"> <File name="C:\silly\bar.xml" /> <!-- <File name="C:\silly\baz.txt" /> --> <!-- <File name="C:\silly\foo.txt" /> --> <File name="C:\silly\quz.py" /> </Project> </NotepadPlus> Using Find in Projects to search only some files

    One way to make life easier would be to use the Find in Projects feature of the find/replace dialog to search your project. You just go to Workspace->Find in Projects... from the project panel, and the Find in Projects dialog will pop up. See the documentation here.
    8e658c10-8cc4-4c17-840a-560282c19473-image.png
    Suppose I wanted to restrict my search to txt files and xml files. That’s what the *.txt *.xml is doing.
    If you search, a bottom bar will pop up in Notepad++ showing your search results.

  • Find and replace white space with tabs

    10
    0 Votes
    10 Posts
    3k Views
    Alan KilbornA

    Just be careful not to do Ctrl+Delete in this situation:

    df62cf80-cc96-4ac3-bcc4-9d29e53592a5-image.png

    If you do, it will remove FIRST on line 1 and BAR on line 7.

    Always have at least one space character on each line to the right of the “tall skinny” caret.

  • How to hide specific files by file extensions in Workspace

    2
    0 Votes
    2 Posts
    236 Views
    Alan KilbornA

    @WolfyRed

    Isn’t this really just a corollary to your question HERE? You could have asked both questions in one topic thread.