• 0 Votes
    7 Posts
    508 Views
    PeterJonesP

    @Marc-Forward

    If your langauge is called MyCoolLanguage, then all you need in the EnhanceAnyLexer config is

    [MyCoolLanguage] 0xcccccc = ‹.*?›

    I just set mine to the default “User Defined Language”, which needs [udf] as the config-file header, but this shows it working:
    f1b71f4b-54b2-4f74-980d-1ff2a332d047-image.png

  • Replace pattern not working correctly

    3
    0 Votes
    3 Posts
    254 Views
    Alan KilbornA

    You could obtain a group one in your find string by changing it to: (?<=\x20{6})(.*)$

  • In my picture, what is the bar on the left?

    2
    0 Votes
    2 Posts
    500 Views
  • Combining offset lines

    6
    0 Votes
    6 Posts
    315 Views
    Neil SchipperN

    @Brennan-OBrien said in Combining offset lines:

    changing the last {4} to {5} and {6} respectively solved it

    Good to hear. It could also have been dealt with by using {4,6} which would handle all 3 cases in one go. (Speaking of which, with this problem fresh in your mind, it might be a good time to peruse the regex documentation just enough to identify the pieces that were used in the solution expressions.)

  • Sort ignoring leading 'the'

    6
    0 Votes
    6 Posts
    569 Views
    deleeleeD

    @PeterJones said in Sort ignoring leading 'the':

    You can record that as a macro

    Ooops sorry. I was basing that on a comment you made on a previous post of mine but I misunderstood part of it and thought you had said only search/replace could be recorded as macro. You had actually said the only ‘dialog-based action’ that could be recorded was a search/replace. I thought the sort in this instance would be problematic but it’s not a dialog. So I’ve created a macro and can now sort with ignore. Thanks again!!

  • Is there any way to assign a Plugin's function to a hotkey?

    4
    0 Votes
    4 Posts
    545 Views
    safetacoS

    Thank you so much guys. I am pretty new to all of this and I see I have a lot to learn :)

    I will get this set up now!

  • clean text, delete all but not first numbers above certain sentence/word

    2
    0 Votes
    2 Posts
    170 Views
    EkopalypseE

    I would go this way

    9f54e52c-68fd-43c2-8514-e02853038a75-image.png

    mark all lines containing a number with 5 or more digits: \d{5,}
    right-click on one of the bookmark symbols (the blue dots) and select remove unmarked lines

  • Text highlighting configuration

    2
    0 Votes
    2 Posts
    395 Views
    EkopalypseE

    @AlexMcGopher

    This looks like error list files.
    Currently, including 8.4.6 there is no native Npp way to implement this, but you can install the PythonScript plugin and use this with a script such as provided here.

  • Make Notepad++ Default Program

    7
    0 Votes
    7 Posts
    12k Views
    Geo RG

    @musikerv Thanks much this is the easy way to make changes.
    BTW, npp = the program itself Notepad++

    Using the tab Settings and then Preferences

  • Convert subrip file

    2
    0 Votes
    2 Posts
    930 Views
    PeterJonesP

    @Bernard-Danino ,

    The first step is easy: If you have an ANSI-coded file (I am assuming Windows-1252), Notepad++ can open that directly. Then use Encoding > Convert to UTF-8 to convert it to UTF8. Save it (I would recommend under a new name or new directory, so that you don’t lose your original, in case something goes wrong).

    Notepad++'s regular expression syntax knows something called equivalence classes, which matches a letter and all its accented variants. So [[=a=]] would match any of àáâãäå – that is, any accented a. So you could do a series of search/replaces to do each of the equivalence classes one at a time. Unfortunately, equivalence classes are also case-insensitive, so [[=a=]] also matches all the upper case versions ÀÁÂÃÄÅ. So if you did that match, and then replaced with a, it would take all the upper case variants (including a plain A) and make it lower case. My guess is this would be a deal breaker for you. (Clicking “Match Case” will not prevent that, nor will using (?-i) to make the regex case-sensitive.)

    As an alternative, you could just make your own set-based character class, [àáâãäå], checkmark “Match Case”, and replace with a, and that would un-accent all the accented a variants. (If French doesn’t use all those, you could make a shorter list in the set.)

    You could also use alternation and capture groups in your search expression, and conditional substitution in your replacement expression, and build up something that can do the de-accent in one fell swoop. (You could even record it as a macro, so that you can assign a keystroke to your “deaccent macro”)

    For example,

    FIND = (?-i:([àáâãäå])|([ÀÁÂÃÄÅ])|([èéêë])) I included the (?-i:...) wrapper to make it case sensitive, even if you forget to checkmark Match Case REPLACE = (?{1}a)(?{2}A)(?{3}e) this says if group 1 (the lowercase accented a’s) matched, replace with a, if uppercase A-accents match in group 2, replace with A, etc. SEARCH MODE = Regular Expression REPLACE multiple times, or REPLACE ALL

    Hopefully, you can see how to expand my example to include other accented characters – put each list of accents in a ([...]) separated by |, and add a new (?{###}x) replacement for each.

    All of these assume you are using Search Mode = Regular Expression.

    See also:

    https://community.notepad-plus-plus.org/topic/18870/search-accent-insensitive https://community.notepad-plus-plus.org/topic/22938/search-for-accented-words
  • v8.4.6 Compare v202 won't install

    11
    0 Votes
    11 Posts
    6k Views
    PeterJonesP

    @POMalley7 ,

    I don’t know why you cannot find ComparePlus in any tab of Plugins Admin with that setup.

    However, you should be able to install it manually, even without Plugins Admin. I know you said you tried before, but please follow these exact steps anyway.

    Close/Exit Notepad++ completely Go to https://github.com/pnedev/comparePlus/releases/latest , and download ComparePlus_1.0.0_x64.zip Create C:\Program Files\Notepad++\Plugins\ComparePlus\ Unzip ComparePlus.dll from the zipfile into that folder Unzip the libs\ folder from the zipfile into that same folder You should have the structure:
    f467454e-476f-4cb0-96f9-bd972387db2a-image.png Run Notepad++

    At this point, you should have ComparePlus in the Plugins menu.
    85f9cc21-8985-4213-9107-b0b9b8a66c01-image.png

    If not, please share your updated Debug Info, and also a directory listing of your C:\Program Files\Notepad++\Plugins\ directory, as well as the contents of the C:\Program Files\Notepad++\Plugins\ComparePlus\ directory (… whether by screenshot or copy/pasting from a cmd.exe or powershell window)

  • Auto Find and Replace 6 Keywords in a Script between to different pages

    15
    0 Votes
    15 Posts
    3k Views
    PeterJonesP

    @Alan-Kilborn said in Auto Find and Replace 6 Keywords in a Script between to different pages:

    you get no background differentiation with it

    Ah, right, I forgot that. So using the ```txt will keep it in the backgrounded box, whereas ```z will make it blend in more with normal text.

  • Can't use the macro on new window

    5
    0 Votes
    5 Posts
    526 Views
    PeterJonesP

    @Neil-Schipper said in Can't use the macro on new window:

    someone was sufficiently annoyed by the inability to secure active-but-volatile settings (prone to being lost on a power outage) that they provided a script to execute a quit-restart cycle

    Specifically, in Notepad++ Restart Shortcut Key discussion.

  • Notepad sees files with .tcl extension as shell file

    11
    0 Votes
    11 Posts
    1k Views
    Alan KilbornA

    @Gor-Abgaryan-0 said in Notepad sees files with .tcl extension as shell file:

    And what about <#!/bin/sh> at the beginning of the tcl file? Is there a way to read this file as a TCL file?
    There were a feedback saying there is no way.

    I still don’t believe this is currently possible, but I think a change is coming soon to Notepad++ to allow this to happen.

    This ISSUE that came up recently describes a similar situation and links to some others discussing the impending code change.

  • Sentences and words

    4
    0 Votes
    4 Posts
    362 Views
    Alan KilbornA

    @Neil-Schipper

    Isn’t the number of “paragraphs” simply the number of files then?

    OP did not ask for paragraph count.

    Correct. I was merely commenting on that, not supplying any kind of “solution” for it.

    <run of non-periods><period> is not a great definition of a sentence due to false positives with decimal numbers.… among other things.

    We know this… I was wanting the OP to try the solution and point this out, at which time we would explain that they are pretty much asking for an impossible task…at least with what Notepad++ can do.

    However, if the need is not for a 100% exact count, but possibly one that is somewhat close, simple algorithms might work.

  • Sort lines ascending

    4
    0 Votes
    4 Posts
    302 Views
    Neil SchipperN

    @Jose-Emilio-Osorio The (many!) sort commands are located under (menu) Edit -> Line operations.

  • Error in page display

    4
    0 Votes
    4 Posts
    295 Views
    Neil SchipperN

    @PeterJones said in Error in page display:

    the pilcrow symbol ¶ on the toolbar

    That word is new to me, thanks. It also has quite a cute synonym, paraph:

    The pilcrow, ¶, is a typographical character that marks the start of a paragraph. It is also called the paragraph mark (or sign or symbol), paraph, or blind P.

    So I learned two new words today. It remains to be seen if I’ll still know them in 3 days…

  • Macro not recording/performing Find and Replace task.

    4
    0 Votes
    4 Posts
    412 Views
    Neil SchipperN

    @Aaron-Bishdou Treat the tuning of a Find & Replace operation as a separate and preliminary task before thinking about macros. It is rare to have to examine npp’s representation of F&R ops in shortcuts.xml at all.

    The transformation you are hoping for does not seem complex. If you want help, show explicitly the expressions you are trying in the Find and the Replace fields along perhaps with optional settings in the F&R dialog.

    Also, think about whether your sample text captures all the anticipated variation (field names & lengths) in your log files.

  • NppFTP No folder display

    3
    0 Votes
    3 Posts
    364 Views
    Greg HerzbergG

    @PeterJones
    TY. I’ll have to familiarize myself with Putty’s built-in tool. Failing that, I’ll try the Plugin’s forum.

    Hmm, the Openssh-sftp-server had vanished from the afflicted router. That’s odd. Reinstalling that package fixed the folder display issue.

  • How to disable red line into last version of notepad++

    3
    -1 Votes
    3 Posts
    1k Views
    Massimo PiscopoM

    @PeterJones solved, thank you REALLY much <3