• I want to mark lines that do NOT contain a certain character

    3
    0 Votes
    3 Posts
    237 Views
    Chris Tanguay 0C

    @Alan-Kilborn Thank you. That works prefectly!

  • the file is unreadable

    2
    0 Votes
    2 Posts
    579 Views
    Alan KilbornA

    @Чёрный-Хомячок

    It looks like you have a binary file, and you should not edit that with Notepad++ (a text editor, not a binary editor).

    You should edit such a file with a “hex editor”, but in your case since you don’t know already these things it is probably ill-advised for you to edit it at all.

  • Synchronized Vertical Scrolling is grayed out.

    2
    0 Votes
    2 Posts
    205 Views
    PeterJonesP

    @Luis-Piña-III ,

    Do you have two views visible?

  • Replace some text of a string in multiple lines

    2
    0 Votes
    2 Posts
    123 Views
    Alan KilbornA

    @Sheraz-Ahmed

    So…what makes the example BISM different from the other occurrences of BISM? This would be critical to know in order to offer advice to you.

  • Show no-break space

    7
    1 Votes
    7 Posts
    35k Views
    Alan KilbornA

    For those interested, there’s a PythonScript way of doing this sort of thing, HERE.

  • Replace lowercase with uppercase between brackets

    11
    1 Votes
    11 Posts
    2k Views
    Hank KH

    NP …Thanks again Terry … Cheers

  • Find identical paragraphs

    4
    0 Votes
    4 Posts
    794 Views
    PeterJonesP

    @Caro-Chennouf ,

    I figured out why my regex wasn’t working, so was able to get it to properly match an N-line paragraph that has a repeat later.

    if you’re in v8.x, go to Settings > Preferences > Highlighting Go to the Mark All section and uncheck Match whole word only
    c88196e3-89b5-4a06-8971-07bdbc24e946-image.png Go to the first line (Ctrl+Home) FIND the first instance of each paragraph Search > Find FIND WHAT = (?-s)((^.+?(\R|\Z))+)(?=(?s:.*)\1) Search Mode = ☑ Regular Expression FIND NEXT
    => this highlights the first paragraph that is repeated somewhere else
    f7ea6590-2d52-42d7-866c-0c8d8456b4d1-image.png Use Search > Mark All > Using #th Style (or right click context menu > Style All Occurrences of Token)
    => all of the instances of that first paragraph should be marked with that style number
    04df6ffc-e045-4443-a690-d0d2b60bc17e-image.png Use Search > Next or F3 from the editor window, or the FIND NEXT button in the FIND dialog, to select the next “first instance of a paragraph”, and style using a different #th style. Repeat as necessary.
    b162546d-52a7-405c-b113-3faa0da8ffa4-image.png

    So it’s not 100% automated, but it’s better than manually having to find each paragraph (chorus or bridge) And remember, this will not be saved in the file; the next time you open it, you’ll have to do it again.

  • 0 Votes
    2 Posts
    163 Views
    EkopalypseE

    @Mahfuj-Khan

    That’s like saying my car is broken, what’s the problem?
    If you REALLY need help to solve the problem,
    you need to give more information about what you have done,
    with which version, if errors occurred and so on …
    In short, useful information that one can take to try to replicate your problem.

  • Find number, insert further along the line

    3
    0 Votes
    3 Posts
    147 Views
    Alexander WilsonA

    @Alan-Kilborn
    You are an absolute genius! That worked a treat!
    Thank you very much!

  • Need Help ! I want to insert an element after each 2 words

    3
    0 Votes
    3 Posts
    169 Views
    patrick rozonP

    It works well, I thank you very much dear Alan for your support.

  • setting npp as the default of text files in Windows 7

    4
    0 Votes
    4 Posts
    493 Views
    Donald BellefuilD

    I had to change the registry per your suggestion. Thank you.

  • Messagebox showing how many replacements were made.

    2
    0 Votes
    2 Posts
    156 Views
    Michael VincentM

    @William-Martin said in Messagebox showing how many replacements were made.:

    does not generate a MessageBox showing how many replacements were made.

    Is the status in the Find/Replace window not good enough? I prefer that rather than a pop-up window I need to dismiss:

    05290d7d-0e58-4800-a6d0-b694efdb35f1-image.png

    Cheers.

  • Single quote character

    5
    0 Votes
    5 Posts
    636 Views
    PeterJonesP

    @Ian-Whyte said in Single quote character:

    How do I change the font in Notepad++?

    Settings > Style Configurator > Global Styles > Default Style > Font
    (see style configurator documentation)

    And as you discovered, it’s not likely a font issue: I have never seen a font where ASCII 39 single-quote ' is rendered the same as ASCII 96 back-tick/grave-accent ` and as Stefan said is also different from the Unicode U+00B4 acute accent ´. (And none of these should not be confused with the ‘smart single-quote’ characters ‘ and ’ which this forum will convert unprotected single-quotes into if you’re not careful). But in Notepad++, if you keyboard is set up as normal, and you don’t have Windows configured to map that key to a different character, then typing a single-quote-key on your keyboard should give you ' in Notepad++.

  • Record a macro that's just the pasted text?

    7
    0 Votes
    7 Posts
    3k Views
    Alan KilbornA

    @PeterJones said in Record a macro that's just the pasted text?:

    Anything you can do in a macro, you can do in PythonScript

    Definitely note that the converse is not true…macros are very limiting.

  • Find a text in multiline and replace text

    9
    0 Votes
    9 Posts
    509 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
    794 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
    615 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.