• Mark All or Mark Selected Words

    2
    0 Votes
    2 Posts
    1k Views
    Terry RT

    @joe-junior said in Mark All or Mark Selected Words:

    How can I get that done?

    There are a few ways of highlighting the required character strings. It will depend on what you ultimately intend to do with the highlighted text.

    Use Mark function (Search, Mark). You can set the search mode as normal and type in each string (one at a time) and hit the “Mark All” button, repeat for each string. At the end all of the strings wanted will be highlighted.

    Again using the Mark function but this time the search mode is “regular expression”. The Find What window will be HD|SD|12|#\+. Note that in this case as the + character is a meta-character (means something other than the character it is) I had to “escape” (\) it so that the regular expression engine will look for the plus sign rather than it’s normal meaning of “as many of the previous character together”. The | character is a separator character. it means this or that (Alternation, OR operand). So the regular expression engine can look for each string as a separate search simultaneously. Also if you only want the exact character (such as H, not h) then also click on the “Match Case” button.

    If you were wanting to remove (or copy) the lines containing the strings you would still use option #1 or #2 above, but also tick the “bookmark line”. Once the search has completed the left margin will contain a blue icon (sphere, circle) for lines containing the strings you seek. Right click over one of these and you will see options to copy, remove, cut (and then paste into another tab).

    If these do not benefit you, you will need to expand on your requirement. You should also consider reading the pinned post in the “General Discussion” called “Please Read This Before Posting” as it will help you include examples in the correct manner and also suggest other links in this forum to read.

    Terry

  • Macro and Run Commands Compatibility

    1
    0 Votes
    1 Posts
    323 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    mkupperM

    @Bas-de-Reuver Notepad++'s regular expression search/replace has a couple of things that you and others may find useful.

    \R matches any style of newline such as CR, LF, and CRLF. While \R does not work in the replacement part it’s still useful.

    You can remove blank lines using ^\R+
    You can remove spurious blank lines using ^\R\K\R+
    The \K says to keep everything to the left meaning it will keep one blank line while removing spurious blank lines.

    In both cases it’s a regular expression search/replace with the replace part being nothing or blank. This also means we don’t care about the current end of line format as \R matches any of them and \K ends up keeping whatever end-of-line style is in use.

    It’s not clear from the OP’s example if they desired to remove the blank lines and then sort the resulting list or if they desired to have some sort of combining, merging, or interleaving of the lines that may or may not be sorted. As the OP then wanted to delete the thread it will likely forever remain a mystery.

  • Can't view Project Panel 1 and 2. How to show again?

    6
    0 Votes
    6 Posts
    568 Views
    Sally OctaviaS

    It is possible and has been found successfully.

    maybe it’s true, I searched for too much text, and had a typo or extra space in file or something.

    But this has worked
    Thank you for your help in helping me with the details

  • How to insert text before every line

    6
    0 Votes
    6 Posts
    2k Views
    Alan KilbornA

    @Chuck-Roberts

    If you have the Better Multiselection plugin installed and enabled…

    If you create a “column caret” (hold Shift+Alt while using arrow keys) before invoking the Column Editor, like this:

    3160e7fb-181c-4ecd-9ba9-e905a3d6bb03-image.png

    Then, after Column Editor does its work:

    c6cbd864-cca7-4bd0-94b2-208dde6f7908-image.png

    arrow to the right one time:

    e938dcee-bc58-4793-a765-2a45347d66de-image.png

    Then press period and space:

    2a923793-eb8f-4843-ae41-f00bd7d7031d-image.png

    @Mark-Olson said:

    I’m pretty sure that AlanKilborn recently authored at least one PR that improved the incrementing number feature in the column editor

    It is true, see HERE, but it would not have any impact on what @Chuck-Roberts needs to do here.

  • 0 Votes
    2 Posts
    385 Views
    PeterJonesP

    @Gordon-Gordonplex said in Make indentation and cursor position like other tsxt editors:

    know what setting should be changed and what it should be set to to fix it

    It’s not a problem, it’s a feature. Just a feature that doesn’t currently help you. Which is why “there are so many settings”

    The Settings > Preferences > Auto-Completion > ☑ Auto-Indent checkbox controls this. It defaults on, and it sounds like you want it off.

    There are so many settings (both Preferences and Style Configurator) that I can’t figure out which one might help

    Did you try going to the preferences page in the User Manual and search for the word indent? There are exactly 9 matches right now, one third of which are talking about the setting you need. It would have taken less than 5 minutes of your time to follow the ?-menu’s Notepad++ Online User Manual link, then see that there’s a page on preferences, then search for indent and read the three sections that show up – and you would have had your answer in the second of those three sections.

    I think it thinks I’m writing Fortran or something.

    Does it say “Fortran” or similar on the lower-left of your Status Bar?
    a55bb9fb-dc1f-4ac0-8865-f72e1faefdbc-image.png
    Or if your Status Bar is hidden, or too narrow to show the language name, what does the Language menu indicate?
    Or did you just say “Fortran” because you assumed it must be treating it as some sort of programming language, and “Fortran” is the first that came to your mind. (BTW: congratulations if “Fortran” is the first programming language that comes to your mind; most people would have said “Python” or some plebian “modern” language, not something as noble as “Fortran”. :-) )

    If your text files have non .txt extensions, it might be an extension that Notepad++ associates with another language. If that’s the case, let us know, and we can explain how to get that extension to automatically be Normal Text instead of Fortran (or whatever it actually is).

  • Script for better counting

    1
    5 Votes
    1 Posts
    428 Views
    No one has replied
  • Regular formulas

    1
    0 Votes
    1 Posts
    182 Views
    No one has replied
  • Notepad++ batch is no longer showing up on the language pulldown

    3
    0 Votes
    3 Posts
    228 Views
    PeterJonesP

    @Robert-Maarschalkerweerd ,

    Notepad++ batch is no longer showing up on the language pulldown

    Most likely, either your langs.xml has been corrupted (and given your text file about is talking about editing langs.xml, that is highly likely), or you have used Settings > Preferences > Language and moved Batch into Disabled Items, like:
    7057f840-8606-4a9c-a25c-6036987a3dc1-image.png

    If the latter is the case, click on Batch in that list, then click the <– button to put it back into your Language Menu

  • Search for a setting by its name

    5
    1 Votes
    5 Posts
    512 Views
    fml2F

    @Mark-Olson Thank you! The plugin does indeed accomplish what I needed, although in a bit other way than I thought.

  • difference between file => save as and save a copy as.

    4
    0 Votes
    4 Posts
    7k Views
    Alan KilbornA

    @PeterJones said in difference between file => save as and save a copy as.:

    because I wanted to save the current state of the file as a backup under a new name

    That’s about the only useful use for it.
    The way I use it more often though, is to keep working with both files.
    Thus, it becomes a multistep procedure for me. I have to Save a Copy As, and then File > Open the other file.
    This annoyed me so much at one point that I wrote a script (or someone else did and I just started using it) that does it in one step.

  • 0 Votes
    9 Posts
    752 Views
    guy038G

    Hello, @mkupper and All,

    Refer to the this post in order to correctly use the free-spacing mode :

    https://community.notepad-plus-plus.org/post/61100

    IMPORTANT :

    Multi-lines free-spacing regexes, like, for example :

    (?x-i) ^ \x20 \x20 abc # String 'abc' with LEADING spaceq | # or ^ \x20 \x20 def # String 'def' with LEADING spaces

    Works correctly, ONLY IF you click on :

    The Find Next or the Count button of the Find dialog

    The Replace or the Replace All button of the Replace dialog

    The Mark All button of the Mark dialog

    It will fail if you click on :

    The Find All in Current document button, of the Find diaog

    The Find All in All Opened Documents button, of the Find dialog

    The Find All button, of the Find in Files dialog

    The Find All button, of the Find in Projects dialog

    In addition, it wrongly switches the search mode to the Extended mode

    Instead, when using these buttons, you’ll have to use, either :

    A free-spacing regex, on a single line, ONLY, as, for example, the regex (?x-i) ^ \x20 \x20 abc | ^ \x20 \x20 def

    The simple regex (?-i)^\x20\x20abc|^\x20\x20def, with all text attached

    Refer to my GitHub issue :

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12673

    Best Regards,

    guy038

  • Trying to remove Line XXXXXX text in new document

    4
    1 Votes
    4 Posts
    32k Views
    Alan KilbornA

    @Mark-Olson

    I don’t know from the OP’s OP that his problem was related to the size of files he works with; I mean, he did hint at working with large files but the problem experienced itself didn’t seem related.

    Anyways, good to know about your plugin…

  • Problems with Math FAQ's Columns++ entry

    9
    0 Votes
    9 Posts
    649 Views
    CoisesC

    I said in Problems with Math FAQ's Columns++ entry:

    Beware of using a capture group like $1 immediately followed by a (?=…) substitution; at present, this does not work as expected. Instead, write the capture group as ${1} to avoid unintended results.

    This is fixed in version 0.7.3-alpha, so there is no further need for this warning.

  • Export settings?

    3
    0 Votes
    3 Posts
    4k Views
    m rM

    I moved contextMenu.xml, shortcuts.xml, langs.xml, stylers.xml, and config.xml to the current installation folder.

    Seems ok. Anything else?

  • Hearts Should Be Shown In Color

    5
    0 Votes
    5 Posts
    356 Views
    Alan KilbornA

    @mkupper

    I was hinting that as the Find what box data is tightly related to data in the editing window of Notepad++, perhaps the Find what box should also be a Scintilla control.

  • CSS comments should be in GREEN

    8
    1 Votes
    8 Posts
    2k Views
    rdipardoR

    @Gulshan-Negi-0 said in CSS comments should be in GREEN:

    Well, in my opinion and knowledge, the comment color of CSS is customizable, which means you can change the color of CSS comments.

    This topic is about inline CSS between <style>...</style> tags in HTML documents. You are talking about standalone style sheets with the *.css extension.

    To demonstrate that you cannot set the style of inline CSS in HTML files, you can try the following:

    Save this markup as index.html: <html> <style type="text/css"> /* comment */ </style> </html> Open index.html in any published version of Notepad++ Go to Settings > Style Configurator Select “Language: CSS” Select “Style: Comment” Change the style and save Observe that nothing happens

    html-with-inline-style-npp.8.5.7-002.png

    Now select CSS from the language menu at Language > C > CSS, and observe that CSS comments are styled as specified in Style Configurator:

    style-sheet-npp.8.5.7-002.png

  • Draconian ShellExecute Error Code 2

    2
    0 Votes
    2 Posts
    295 Views
    PeterJonesP

    @Brad-F said in Draconian ShellExecute Error Code 2:

    And am looking at this within my shortcuts.xml file.
    Could someone tell if it looks right? Does Shift=“no” matter? Otherwise I see nothing.

    The Shift="no" means that the keycode 71 (G) is not shifted. So Ctrl="yes" Alt="yes" Shift="no" Key="71" means Ctrl+Alt+G whereas Ctrl="yes" Alt="yes" Shift="yes" Key="71" would have meant Ctrl+Alt+Shift+G.

    <Command name="Chrome" Ctrl="yes" Alt="yes" Shift="no" Key="71">&quot;C:\Program Files\Google\Chrome\Application\chrome.exe&quot;&quot; $(FULL_CURRENT_PATH)&quot;</Command> <Command name="FF" Ctrl="yes" Alt="yes" Shift="no" Key="70">&quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot;&quot; $(FULL_CURRENT_PATH)&quot;</Command>

    The &quot's seem to be on the wrong side of the space. When running the command, you want the equivalent of "path\chrome.exe" "$(FULL_CURRENT_PATH)" (quote space quote), but you have the equivalent of "path\chrome.exe"" $(FULL_CURRENT_PATH)" (quote quote space) – so there is no space between the executable and the name of the file, and the file’s path is being interpreted as starting with a space. My guess is that if you fix it to the following, it will work:

    <Command name="Chrome" Ctrl="yes" Alt="yes" Shift="no" Key="71">&quot;C:\Program Files\Google\Chrome\Application\chrome.exe&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> <Command name="FF" Ctrl="yes" Alt="yes" Shift="no" Key="70">&quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command>

    Unsolicited Advice #1: the View > View Current File In… menu has existed for years now for running the installed versions of Chrome, Firefox, and Edge (and even the horrendous IE). No need to duplicate the functionality in the Run menu, as long as you are not doing something weird (like installed Firefox/Chrome in non-standard locations, or with command-line options, neither of which you are doing, based on your pasted commands.)

    Unsolicited Advice #2:

    C:\Program Files (x86)\Notepad++

    Why are you using 32-bit Notepad++ on a 64-bit system? There’s virtually no good reason for doing that in 2023. (Any plugin worth having, that I know about, has been transferred to 64bit years ago.) Unless you know why you need 32-bit, you should install the 64-bit Notepad++. (Future versions of Windows OS are unlikely to support 32-bit applications, so you need to transition apps sooner rather than later to make the transition to the updated OS seamless.)

  • Can low reputation users be prevented from necroposting?

    10
    1 Votes
    10 Posts
    645 Views
    Lycan ThropeL

    @PeterJones
    Yeah, I guess it would be kind of difficult to automate that kind of abuse out, being committed by people that have no real skill sets other than to imitate being trained monkeys. :-)

  • Links with spaces in folder name...

    2
    0 Votes
    2 Posts
    357 Views
    PeterJonesP

    @Bob-Haikou ,

    URIs with spaces in them are supposed to be URL-encoded. Try file:///G:/travel%20in%202023/TRIP%20TO%20BLACK%20STOOL.NPS

    See the Wikipedia article on File URI Scheme .

    Notepad++ correctly recognizes the following standards-compliant file-URI as a link:

    file:///c:/program%20files/notepad++/change.log

    d3ddb420-fd3f-4d21-bdd8-817b6575191f-image.png

    Once again, this is actually a URI question, not anything that’s Notepad++ specific.