• How to join some lines with desired specifications in notepad++

    3
    0 Votes
    3 Posts
    448 Views
    AliMirzaei5778A

    @peterjones
    Thank you very much. Everything is perfect.

  • find and replace with wildcards

    16
    0 Votes
    16 Posts
    2k Views
    john EskiJ

    @guy038 Thanks Guy and Terry

    this is a machine file so certain piece have more operations than others (operations like Dimple)

    terry’s code worked really well. Thank you again Terry, now i just have to do the reading to comprehend

  • Grab text from chrome

    2
    0 Votes
    2 Posts
    202 Views
    PeterJonesP

    @lisa ,

    Not built in. Notepad++ does not know how to remote-control Chrome (or any other app)

    That said, as a workaround, just copy the URL from Chrome yourself, and paste it into your Notepad++ document.

    Or use Chrome’s built-in bookmark feature, as that is that feature’s reason existence

  • Modify shortcut menu entry executes HTMLTidy

    3
    0 Votes
    3 Posts
    217 Views
    aranapatonaA

    @konrád-lőrinczi said in Modify shortcut menu entry executes HTMLTidy:

    When I press the Macro > Modify shortcut / Delete macro menu entry in Notepad++, HTMLTidy is executed on the current file, then I get a popup error dialog:
    TextFX
    “Writing error summary to C:\winprg\Notepad++\plugins\NppTextFX\Config\tidy\HTMLTIDY.ERR”

    Debug info:
    Notepad++ v8.1.9.3 (32-bit)
    Build time : Dec 6 2021 - 19:16:45
    Path : C:\winprg\Notepad++\notepad++.exe
    Command Line :
    Admin mode : ON
    Local Conf mode : ON
    Cloud

    Config : OFF

    OS Name : Windows 7 Professional (64-bit)
    OS Build : 7601.0
    Current ANSI codepage : 1250
    Plugins : BetterMultiSelection.dll ccc.dll ComparePlugin.dll DSpellCheck.dll HTMLTag_unicode.dll mimeTools.dll NppCalc.dll NppCCompletionPlugin.dll NppConverter.dll NppExport.dll NppFavorites.dll NppSnippets.dll NppTextFX.dll NppTextViz.dll PreviewHTML.dll QuickText.dll Remove Duplicate Lines.dll SelectQuotedText.dll SessionMgr.dll SherloXplorer.dll SurroundSelection.dll Translate.dll WebEdit.dll WindowManager.dll

    How to fix this problem?

    Thanks!

    this happened to me too, just remove textfx and reinstall it, problem is am already defined macro (alt-shift-s) that is conflicting with textfx

  • Python console, Goto line appears to have stopped working

    4
    0 Votes
    4 Posts
    327 Views
    rdipardoR

    It’s already been reported to the PythonScript devs: https://github.com/bruderstein/PythonScript/issues/234

  • Paste the output of an executable (exe) in Notepad++ current file

    4
    0 Votes
    4 Posts
    1k Views
    AmitA

    @peterjones I will give pythonscript plugin a try. Thank you. Really appreciate a detailed answer.

  • 0 Votes
    7 Posts
    389 Views
    Ken ShawK

    @peterjones
    Woot my company installed the latest version of NotePad ++ so very happy

  • Is multi-caret editing bugged?

    25
    0 Votes
    25 Posts
    3k Views
    Alan KilbornA

    I just noticed an ISSUE that seemed very relevant to this thread.

  • 0 Votes
    7 Posts
    509 Views
    Robin CruiseR

    @guy038

    I try myself to find a generic, from your regex. Works well, except doesn’t work for " (double quotes) because is repeated in the tag construction. I change those extra quotes on the content of tags, with a work, like “BOOM” and it find/replace it well beetween start and ending tag.

    These are the generic regex for your second solution. Are almost the same, short and long version. Makes the same thing, find and replace just well between start and ending tags.

    (?<!=\x20)(?<!=)FR(?!>|ESR|\x20>|\x20/>|\?>|\x20\?>|BSR)

    OR

    (?<!=\x20)(?<!=)FR(?!>|ESR|\x20>|\x20/>|\?>|\x20\?>|\x20BSR)

    OR

    (?<!=\x20)(?<!=)FR(?!>|ESR|\x20\?>|\x20BSR)

  • Copy only the not hidden text.

    4
    0 Votes
    4 Posts
    1k Views
    guy038G

    Hello @kanagi, @alan-kilborn and All,

    In addition to the Alan’s python script, I advice you to read this post first

    Then, if not confidential, you could share with us some text with possible hidden parts and we’ll probably be able to find out some regexes to bookmark the non-hidden sections or the hiden ones !

    See you later,

    Best Regards

    guy038

  • Multi-Line Indent No Longer Working in v8.3.3

    2
    0 Votes
    2 Posts
    191 Views
    PeterJonesP

    @vincil-stockdale ,

    It works for me: select multiple lines, hit TAB to move them one tabstop right, and Shift+TAB to move them one tabstop left, which is exactly what I expect:

  • select products with a certain category (tag)

    4
    0 Votes
    4 Posts
    354 Views
    PeterJonesP

    @massimo-la-terra said in select products with a certain category (tag):

    thanks for the answer, sorry for my translated English, in practice with a click I would like to display only the products of the Subcategory> SALUMERIA </Subcategory>

    Notepad++ is an editor, not an XML Presentation filter, so it will never give you exactly that. Its job is to make it easy to edit the raw text as a whole, not easy to just see filter the sub-categories you want

    My first set of instructions will allow you to hide everything, and then you just do the search (as described above) to find the next occurrence of that; after you’ve cycled through enough “Find Next”, you will have shown all the product groups with the subcategory SALUMERIA. Problem solved.

    For example,

    start with <Product> <irrelvant>...</irrelvant> <Subcategory>SALUMERIA</Subcategory> <irrelvant>...</irrelvant> </Product> <Product> <irrelvant>...</irrelvant> <Subcategory>OTHER</Subcategory> <irrelvant>...</irrelvant> </Product> <Product> <irrelvant>...</irrelvant> <Subcategory>SALUMERIA</Subcategory> <irrelvant>...</irrelvant> </Product> <Product> <irrelvant>...</irrelvant> <Subcategory>OTHER</Subcategory> <irrelvant>...</irrelvant> </Product>

    So there are two products in the SALUMERIA subcategory, and two that aren’t.
    2. Hit Alt+0 to hide everything
    5e748307-197b-4df7-9b0c-02556eafd883-image.png
    3. FIND = <Subcategory>SALUMERIA</Subcategory>
    86d57c15-5f0a-42bc-b00b-2cc2dc9e50a1-image.png
    4. FIND NEXT will show the second one as well:
    31a7eb58-9bbd-403a-89b5-8be4b4b45ed4-image.png
    5. Repeat FIND NEXT until they have all been revealed.

    It’s not a single click, but it doesn’t take all that long.

  • How do I replace a text after an = ?

    2
    0 Votes
    2 Posts
    178 Views
    Alan KilbornA

    @ezz-zee said in How do I replace a text after an = ?:

    Find: local Cooldown = \d+
    Repl: local Cooldown = 0
    Search mode: Regular expression

  • Word-wrap crashes TextFx in npp 8.4 and newer

    2
    0 Votes
    2 Posts
    318 Views
    Alan KilbornA

    @mkupper said in Word-wrap crashes TextFx in npp 8.4 and newer:

    discovered that 8.4, 8.4.1, and 8.4.2 are all broken

    Nope, it is not Notepad++ that is broken. It’s the plugin.

  • Regular replace does not work with multiple single quotes

    2
    0 Votes
    2 Posts
    208 Views
    PeterJonesP

    @mscislawin said in Regular replace does not work with multiple single quotes:

    when i copy that and paste it to n++ and do the normal find plus normal replace and want to replace all ‘’ with ’ it only replaces first occurence of the ‘’

    Did you click Replace or did you click Replace All after setting up Find what: '' and Replace With: ' ?

    Because
    76b51f95-e538-48cd-9e09-46b913b4812e-image.png
    =>
    f7fde8af-b620-4656-b355-c851309e7048-image.png

    'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');' 'insert into db.table(parent_id, active, code, name) values (1, true, ''code'',''name'');'

    =>

    'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');' 'insert into db.table(parent_id, active, code, name) values (1, true, 'code','name');'

    It does exactly what I’d expect

  • Add line break in paste after multi-editing

    12
    0 Votes
    12 Posts
    1k Views
    PeterJonesP

    @alan-kilborn said in Add line break in paste after multi-editing:

    wait for someone else to try it, and weigh in on how it went for them

    I installed the script, selected old text and verified it was in the clipboard by pasting. Then I selected two or three disjoint sections in multi-select mode, ran the script, and then pasted, and it pasted each section of the new multi-section data with a newline between, so worked exactly as I believe it was described.

    @Spiros-Doikas , you should look at Plugins > Python Script > Show Console after running the script, and see if it is giving you an error message.

  • How to move from the Search/replace to the edit window.

    2
    0 Votes
    2 Posts
    181 Views
    Alan KilbornA

    @george-worley

    AFAIK the only way is to press Esc which closes the “Find” window.

  • How to schedule a python scripts in plugin manager?

    2
    0 Votes
    2 Posts
    227 Views
    EkopalypseE

    @hulu2007

    What does “repeated” mean in this case?
    Time-based, event-based, or other triggers?
    Because if you are the only one editing these files it
    might be better to run the script once and then use
    another script that ensures that files from that location
    use Ansi encoding.

  • #region support for languages

    4
    0 Votes
    4 Posts
    1k Views
    Noreh ADN

    That’s a bummer. And modifying the source code for something like this seems like a hassle for me. So I’ll probably ignore it :)

    In VS Code (might need extensions though), for example, regions that are in comments (// #region and // #endregion) are supported (in languages like JS, PHP). It’d be nice to have something similar in Notepad++ too.

    I usually use VS Code when I’m working on a project, but for quick modifications, I prefer Notepad++. So I definitely want to see Notepad++ improve.

  • Problems with bidirectional text & find/replace

    7
    0 Votes
    7 Posts
    1k Views
    House EmptierH

    @alan-kilborn That is correct. I can successfully use Notepad++ to do my find/replace task… IFF I watch every term get replaced. If I use Replace All, with a long “Replace with…” string that has complex/SE Asian script in it, then there seems to be some kind of greediness problem that leads to non-matching text being deleted.

    @peterjones Yes, thanks for posting that Python script, it was very useful, and I was able to use it to skip a whole bunch of manual copy/pasting. Anyhow, w/r/t the Unicode declaration in the header: I see it now, the problem was between my chair & my keyboard. I think I deliberately excluded your discussion that was surrounded by triple quotes, which I’m guessing is the Python code-comment convention? … Yep, it is! So when I copied your code, I purposefully skipped all of your discussion-in-comments, so I missed the header entirely, due to my Python ignorance.