• Find a text in multiline and replace text

    9
    0 Votes
    9 Posts
    539 Views
    PeterJonesP

    @shashi-bhosale said in Find a text in multiline and replace text:

    Thanks a lot for help. What website you use to get explanation of the command ?

    You could look in this forum’s FAQ section and find the FAQ entry about Where to find regular expression documentation. It links to the official Notepad++ regular expression documentation, as well as several external sites which are useful for learning about or experimenting with or describing the specifics of regular expressions.

  • Auto-indent behavior issue

    3
    1 Votes
    3 Posts
    883 Views
    Michael VincentM

    @Peter-Johnson

    I thought it may have something to do with SCI_SETINDENTATIONGUIDES but using NppExec to examine my current with Language C (SC_IV_LOOKFORWARD) and then setting to SC_IV_LOOKBOTH, I get the same results as you in both modes.

    Cheers.

  • Red vertical guide line.....

    4
    0 Votes
    4 Posts
    1k Views
    Tim KuechlerT

    [SOLVED] I have the same issue as @Felineuk, (while editing .cpp extension files.) The red line is still there, except it is BLACK, not RED anymore. The background in that area is dark-grey so “black on dark-grey”. Not easy to see.
    Solution:
    Settings > Style Configurator > Fold > Colour Style > Foreground > LIME GREEN
    Settings > Style Configurator > Fold Active> Colour Style > Foreground > FIRE ENGINE RED
    So better than original (IMHO)
    If you need to change the background from dark grey:
    Settings > Style Configurator > Fold Margin> etc.

  • Insert internal hyperlink

    3
  • DELETE DUPICATE URLS WITH SAME DOMAIN

    2
    0 Votes
    2 Posts
    648 Views
    PeterJonesP

    @Varun-Teja ,

    If it doesn’t matter which one you keep (that is, if it’s okay to keep only the last instance of a specific domain), then I would suggest doing it this way:

    FIND = ((?-s)^.*?(https?://[^/]*/).*?$(\R|\Z))(?=(?s).*\2) REPLACE = leave empty SEARCH MODE = regular expression
    3eb6a6e8-c5c8-47ca-9e2d-8ad11dbdcb4f-image.png

    If it doesn’t matter what order they are in, then you could sort first (Edit > Line Operations > Sort Lexiocographically Ascending) and then use that replacement. (edit: Though that’s pointless, because just doing the first also is thus “doesn’t matter what order it’s in”)

    If it does matter what order they are in, then you could use column-select (alt+click+drag) to select the zeroth column in the file, then use Edit > Column Editor > Number to Insert to insert numbers:
    c54d34e2-89c3-4097-a432-00db12883acc-image.png
    (You might want to do a second column select and then also insert a space between the numbers and the lines by selecting the zero-width column after the numbers and then typing a space)

    1 https://www.fourthdomain.example/misc 2 https://www.fifthdomain.example/elsewhat 3 https://www.seconddomain.example/elsewhat 4 https://www.firstdomain.example/blah 5 https://www.seconddomain.example/blah 6 https://www.fourthdomain.example/blah 7 https://www.thirddomain.example/blah 8 https://www.firstdomain.example/elsewhat

    Then, after that, sort descending (so in my example, it would be 8 down to 1). Then do the replacement I showed above. Then sort ascending again. Then remove the leading numbers (another column select followed by cut or backspace, or do a search-and-replace regular expression of FIND=^\d+\x20* and replace with nothing)

  • My macro is not recording the selection of text.

    12
    1 Votes
    12 Posts
    2k Views
    PeterJonesP

    @Stephen-Rieger said in My macro is not recording the selection of text.:

    changed the ‘Command ID’ for this Plugins > MIME Tools > URL Decode for me from 22011 to 22027.

    Plugins have always been dynamically assigned their command ID numbers – it goes sequentially starting at 22000 and assigning them based on the order of the menu entries for each plugin, where each plugin is processed alphabetically (by DLL name, IIRC).

    Any time you change your plugin list – whether it’s because you add or remove a plugin, or if you upgrade to a new Notepad++ version and that changes the number of entries in one of the default plugins or you accidentally forget to install a plugin or you decide you want an extra plugin or if the new version of Notepad++ tells you about an update on one of your plugins so you update that plugin and it has more menu entries – any time any of those changes occur, the command ID for that plugin menu entry will change. This has been true for the entire time I have used Notepad++ over the last decade or more.

  • Adding Additional Functions to PowerShell Language

    2
    0 Votes
    2 Posts
    263 Views
    PeterJonesP

    @unDrac86 said in Adding Additional Functions to PowerShell Language:

    editing the command sources.

    Settings > Style Configurator > PowerShell > CMDLET and add text to the user-defined keywords box

    203a0e34-e1f9-4bf7-a9fd-3646619076ce-image.png

    f9a410ef-c5cc-462a-8cbc-1ba0990a2be7-image.png

    Though I was surprised to learn that at least for PowerShell, the user-defined-keywords box is weirdly case-sensitive: if I typed Get-VM in the box, it didn’t highlight, even though that’s the case that’s used in the file; but if I typed get-vm in the box, it will highlight in the editor, whether it’s Get-VM or get-vm or gET-vM

  • Почему отображается так???

    2
    0 Votes
    2 Posts
    210 Views
    PeterJonesP

    @Scrubbb ,

    not understand, I want to process the DLL, but it opens in this form

    Yes, a DLL is a binary file. Looking at it in a text editor isn’t very insightful.

    Notepad++ isn’t a decompiler – it will not take a compiled exe or DLL and give you the source code.

  • Which data types are allowed to drop?

    7
    0 Votes
    7 Posts
    499 Views
    Mario ValleM

    OK, copying text to clipboard works but it is not drag and drop.
    Anyway, I have to read carefully the @artie-finkelstein part on dropping files. Also I will add a separate “copy to clipboard” functionality that till now is missing (hoping drag&drop suffices).
    See you soon!

  • Fix timing format

    3
    0 Votes
    3 Posts
    207 Views
    Mohammed FouadM

    @PeterJones said in Fix timing format:

    $1,$2
    thanks so much you save my day
    its working with me good

  • Adding Random Charactere/Numbers at line ending

    2
    0 Votes
    2 Posts
    271 Views
    Alan KilbornA

    @SENPAY98K

    Not natively. You can do it with a scripting plugin. You have to write some code to do it.

  • 0 Votes
    5 Posts
    315 Views
    David FindlayD

    @PeterJones Thank you very much. Works well. Wow there is a lot to learn about what notepad++ can do.

  • Notepad++ freezes on large files

    7
    0 Votes
    7 Posts
    10k Views
    PeterJonesP

    @Igor said in Notepad++ freezes on large files:

    Then the app freezes during the work with the file - mainly, during cursor navigation. It freezes and unfreezes, freezes and unfreezes and so on. It seems like some heavy task is running from time to time in the UI thread.

    Yes, it’s a huge file. Notepad++ has a lot of stuff it has to do while navigating around or editing a big file. Sorry.

    As I said, the best option for you on this huge logfile seems to be Plugins > Big Files > Open BigFile, which will look at the file in chunks. If that doesn’t work for you, then there is no more advice I have for you with regard to Notepad++.

  • How to remove after and before

    3
    0 Votes
    3 Posts
    191 Views
    PeterJonesP

    @veronica-fty said in How to remove after and before:

    Jose | Type = Student | phone = 2020 | list = Famly | age = 28 | Date = saturday 2020
    Mary | Type = Student 2 | phone = 2067 | list = Famly | age = 45 | Date = monday 2021

    FIND WHAT = \|.*? (\| Date =)
    REPLACE WITH = $1
    SEARCH MODE = Regular expression

  • 0 Votes
    3 Posts
    192 Views
    Alan KilbornA

    @Scott-Nielson said in How do I reverse the order of the lines in multiple files of a folder with Notepad++ ?:

    but I want to know if that be done for multiple files of a folder

    Short answer: Nope

  • Restore the old theme?

    9
    0 Votes
    9 Posts
    5k Views
    Luiz Felipe Donegá PivaL

    Had the same issue, after some tries, just deleted the “stylers.xml” which was at the APPDATA/Roaming/Notepad++

  • Dark mode problem

    4
    0 Votes
    4 Posts
    1k Views
    Милен СимеоновМ

    @PeterJones said in Dark mode problem:

    I am not going to pay money to try to replicate someone else’s problem.

    I’m not expecting that

    Notepad++ v8.1.2 (64-bit) Build time : Jul 16 2021 - 01:59:50 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : Admin mode : ON Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 2009 OS Build : 19043.1110 Current ANSI codepage : 1251 Plugins : CodeAlignmentNpp.dll ComparePlugin.dll ElasticTabstops.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll nppplugin_svn.dll NppTextFX.dll NppXmlTreeviewPlugin.dll PoorMansTSqlFormatterNppPlugin.dll PythonScript.dll Remove Duplicate Lines.dll

    I tried everything that you mention but, there is no difference.
    When i close NPP and re-open again the spacing is gone :(

    May be my theme is bugged i’ll contact the author
    Thanks

  • Running Python with Notepad++ on Windows

    5
    0 Votes
    5 Posts
    4k Views
    PeterJonesP

    @Dan-Brownsword said in Running Python with Notepad++ on Windows:

    output from an Anaconda Prompt

    Sorry, I don’t know Anaconda, so I don’t know how to issue a command to launch a specific script with a specific python inside the Anaconda shell. Whatever the command-line syntax is for that, you would run that command line from the RUN menu, making sure to put the quotes around any paths that might have spaces in the path name.

  • Open With dialog for all files should include N++

    2
    0 Votes
    2 Posts
    890 Views
    mere-humanM

    There’s a chance it will change as soon as Windows 11 is released.
    If not, then it should be reported as a bug on GitHub.

  • Possible bug or setting missing

    10
    0 Votes
    10 Posts
    501 Views
    Geoff TaylorG

    @PeterJones
    thanks for the info