• how to remove these tips

    Locked
    1
    0 Votes
    1 Posts
    572 Views
    No one has replied
  • Troubles while creating a custon functionList.xml

    Locked
    2
    0 Votes
    2 Posts
    781 Views
    Andrea Del PreteA

    I forgot to add an image of how the function list parses the file with the configuration above:

    https://pasteboard.co/HtPeByg.png

  • Style Configurator: Background color for matching words

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Ronald-Fischer

    I think the “differences” you are seeing are when the two backgrounds are in effect together–could this be right? For example if you double-click a word (or click+drag select an entire word), you get the “selection” background color as well as the Smart Highlighing color…at the same time. This looks like a third color, but it really isn’t. Of course, maybe I’m misunderstanding…

    But the general answer…to this question… :

    Can I somewhere change the colours of these backgrounds?

    …is:

    See Settings (menu) -> Style Configurator… -> Global Styles and then:

    Selected text colour

    and

    Smart Highlighting

    …adjust each one’s Background colour to your liking…

  • Code documentation

    Locked
    1
    0 Votes
    1 Posts
    607 Views
    No one has replied
  • [JS/ES6] Template string syntax

    Locked
    1
    1 Votes
    1 Posts
    875 Views
    No one has replied
  • Finding sentences with open parenthesis that and not closed

    Locked
    14
    0 Votes
    14 Posts
    3k Views
    guy038G

    Hi, @Robin-cruise and All,

    Of course, you may add these 3 look-aheads, consecutively, after the litteral \) ending parenthesis, as you did :

    (?!;)(?![\}])(?![\{])

    Indeed, while evaluating each condition, in each look-ahead, the regex engine location does NOT change ( It is just between the ) and its next character ! )

    However, you can, also, use the unique look-head (?![;{}]) ! In addition, when inside a character class [....], the { and } braces are just literal characters :-))

    Recall :

    Inside a character class [....], 4 characters, only, have a special meaning :

    The character ^, which must be at any position but the first, to be considered as literal or at any position if preceded with the \ escape symbol

    The character ], which must be the very first character, after ], to be taken as literal or at any position if preceded with the \ escape symbol

    The character -, which must be at the very beginning or at the the very end of the character class to be considered as literal or at any position if preceded with the \ escape symbol

    The character \, which can be at any position of the character class, if preceded, itself, with an other \ escape symbol, to be taken as a literal character

    All the other chracters, inside a character class [....], are just literal chars !

    To sum up, assuming an unique block (.....) per line, the regex ^[^(\r\n]*\K\)(?![;{}])|\((?!(?-s).*\)) would find :

    The ending ) parenthesis, if not followed with a ;, a } or a { character AND if a ( parenthesis has not been found, before, in current line

    The starting ( parenthesis, if a ) parenthesis cannot be found, further on, in current line

    Cheers,

    guy038

  • How to increase font size in search result window

    Locked
    7
    0 Votes
    7 Posts
    4k Views
    Scott SumnerS

    @guy038

    I tried a different keyboard and now the numpad shortcuts are working for the Find result panel.

    While I was experimenting I noticed that even if I change the key assignment to SCI_ZOOMIN, SCI_ZOOMOUT, and SCI_SETZOOM in the Shortcut Mapper, only the original numpad shortcuts work in the Find result panel. I’m not surprised by this, just something to note…

    Since I have a wheel on my mouse, I will just continue changing the zoom level in and out (of the two views and the find-result panel) that way. :-)

  • Replace text that ends with number

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    guy038G

    Hi, @anass-chawki, and All

    Ah, OK ! The changes to do are not that important ;-))

    From your last example, I, then, supposed that the match is the shortest range of characters between :

    The literal string live/

    A string made up of, at least, five consecutive digits

    So, my two previous search regexes become :

    SEARCH (?-s)(?<=live/).+?(?=/\d{5,})

    and :

    SEARCH (?-s)live/.*/([0-9]\d{5,})

    Cheers,

    guy038

    P.S. :

    I updated my two previous replacement regexes, which were misspelled !

    The regexes look for the shortest non-empty range of characters ( .+? ), between the two limits, to avoid a wrong match against this kind of data :

    http://mywebsite.net:8080/live/JHsN4SGBS7/2MOLFqluEk/102381.ts|user-agent=VLC/2.2.6 /123456LibVLC/2.2.6.

  • How do I search for <Iron>X</Iron> when X could be any number?

    Locked
    2
    0 Votes
    2 Posts
    750 Views
    Scott SumnerS

    @JasonC

    Does the “JSON file” part of this have any real significance?

    Find what zone: <Iron>\d+</Iron>
    Search mode: Regular expression

    \d means any digit character (0-9)
    + means one or more of what precedes it
    so in summary \d+ means one or more digits

    For more, see this.

  • Join Lines that are breaking

    16
    0 Votes
    16 Posts
    4k Views
    Scott SumnerS

    @PeterJones

    Also, @Scott-Sumner was thinking about turning this old post into an entry on our FAQ Desk, but apparently hasn’t found the Round Tuit™ yet.

    I have begun getting “roun-tuit” but until it is in a form that has at least as much value as the old post there is little value in publishing it. It’s a time-available thing…if you have time, you are of course free to make it way better than I ever could–I’d gladly delete my in-progress draft if something good by someone else magically appears as a FAQ Desk posting. :-)

  • Enabling Synchronize Vertical and Horizontal Scrolling

    Locked
    2
    0 Votes
    2 Posts
    23k Views
    Scott SumnerS

    @Tom-Sawyer

    Right-click the tab of one of the desired files and choose Move to Other View. Then, click the tab for the other file. Now both files should be active, but in two different views. If they are one-on-top-of-the-other instead of side-by-side, right-click the border between them and choose one of the options in the little box that pops up. After that the two files should be side-by-side. And the Synchronise menu options should be enabled.

  • Highlight, Language, Style - hit or miss

    Locked
    2
    0 Votes
    2 Posts
    769 Views
    Eric BurkeE

    I figured it out. The quotes were somehow changed to curly quotes and listed as delimiters. Sorry about that oversight…

  • Plugins menu not sorted alphabetically

    Locked
    2
    0 Votes
    2 Posts
    813 Views
    Scott SumnerS

    @Rick-Pugh

    Already discussed by @dail in this thread.

  • Ctrl+A, then Shift + Mouse Click - unwanted behaviour

    Locked
    5
    0 Votes
    5 Posts
    2k Views
    guy038G

    Hi @dail,

    I’m sorry ! In my previous post, I just forgot to thank you for your… future reply ! So, I do ;-))

    Cheers,

    guy038

  • Batch replacement of string occurence by their replacement string

    9
    0 Votes
    9 Posts
    4k Views
    Scott SumnerS

    @guy038

    Well, yes, that occurred to me as well, initially…but then I assumed that possibly the OP’s word list was going to be too long to fit the 2046 (or is it 2047) character limits of the Find what and/or Replace with fields. Of course, if it is too long, potentially it could be done in batches…

  • Bug report about Word Wrap.

    Locked
    1
    0 Votes
    1 Posts
    503 Views
    No one has replied
  • Sorting multiple chunks of non-connected text

    9
    0 Votes
    9 Posts
    3k Views
    Jeff TestJ

    That was utter brilliance @guy038 . I, i can’t even. Hats off on that.
    (This is not to say that the py script from @PeterJones is out the window, this will just help me convince folks that Notepad++ is the best.) :)

    +++Unrelated+++
    So, is there a book, like NoStarchPress or something for Notepad++? How did you learn all these fancy bits for the regex? (its Perl?)
    Python vs. Perl? (I’d like to learn one, or both. My aim is system administration/automation. Recommendations?)

  • Replacing Tidy plugin

    3
    0 Votes
    3 Posts
    4k Views
    PeterJonesP

    Nope, never used it. When I want to manipulate the text with an external utility, I tend to use NppExec or PythonScript plugins.

    What did you try before you asked the question? Have you tried anything in the month since then? What works, what doesn’t? (People in help forums usually like seeing that you’ve put in effort yourself. Besides, it helps them reproduce your problem, and gives a good starting place for where to go next.)

    However, even though I’ve never used it, I took a 2minute look at the pork2sausage.ini, and it comes with pretty good documentation in the comments section. Here’s how I understand the parameters, after those 2 minutes:

    progPath: full path to the executable you want to run. He used the example of java.exe, but that’s where you’d give the full path to tidy.exe (or whatever Tidy’s executable is called) progCommand: the command you wanted to run. He used an example of calling a specific java class, but you would use something like tiny --option 1 -- something else "$(SELECTION)" workDir: what directory do you want it to run in progInput and progOutput: if you have whole files you want to use, this is where you’d specify them. But that’s if tidy were expecting filenames, and could not handle command-line arguments.

    I know nothing about the tidy executable, so let’s pretend I had a program called transform which takes as its argument a single string, and outputs some transform of the string on STDOUT. My .ini would be something like (untested, since I’ve never used pork2sausage, and haven’t downloaded it)

    [xfrm] progPath=C:\Program Files\TransForm\transform.exe progCmd=transform "$(SELECTION)" workDir=C:\Program Files\TransForm\

    You would then select some text, and run the pork2sausage using “xfrm” (I don’t know how to do that part; presumably, Plugins > Pork2Sausage > xfrm).

    Given that tidying HTML probably wants the whole file, rather than a small selection, and passing newlines over the command line is difficult, you’d be more likely to want the progInput / progOutput version: but then you’d need to always save the file to whatever’s defined in progInput. But at that point, I’d probably switch to NppExec, with something like this command, which I use to take the entire contents of the currently active file, encrypt it using gpg.exe, and paste it back into the active document (and save):

    cls npp_save cmd.exe /c exit %RANDOM% // cannot access $(SYS.RANDOM) directly through NppExec, but can tell cmd.exe to return it as a value set tempfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).tmp // create random tempfile name set ascfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).asc // create associated ascfile name sci_sendmsg SCI_SELECTALL // select all sel_saveto $(tempfile) :a // save selection to the tempfile (use :a to save as ansi, to prevent unicode prefix ÿþ getting embedded) INPUTBOX "Recipients (use -r between multiple): " : email@address // get the recipients gpg.exe --output "$(ascfile)" -ase -r $(INPUT) "$(tempfile)" // armor+sign+encrypt to recipient(s) sel_loadfrom $(ascfile) // replace selection with results sci_sendmsg SCI_DOCUMENTSTART // deselect //rm -rf "$(tempfile)" "$(ascfile)" // cleanup temp files npp_save
  • How convert accents and others chars to utf8

    Locked
    2
    0 Votes
    2 Posts
    964 Views
    crystalfpC

    Do you mean your file contains a mixture of utf8 and non-utf8 characters?
    Have you tried to convert the file encoding to the one of your non-utf8 characters and then back to utf8?
    Hope it helps. mario