• Editing in Notepad++

    9
    0 Votes
    9 Posts
    3k Views
    PeterJonesP

    You’re welcome, @Inshita-Rawat. If you follow the links in the FAQ, especially to one of the try-it-live websites, like regexr.com (*), they will explain the individual elements of the regular expression in great detail.

    *: I usually use regexr, and switch it from “JAVASCRIPT” to “PCRE” in the upper right. PCRE comes come close to Notepad++'s Boost-based regular expressions — since both Boost and PCRE are based on Perl regular expressions, though there are differences (both from each other, and from Perl).

    If you paste my ^(.*?) (\d.*) regular expression into regexr.com with PCRE, and FLAGS=global,multiline (/gm), along with example data – see https://regexr.com/466oe – you can see the explanation, or by clicking on REPLACE, you can input my replace string, and see what it will become.

  • Can not change UI Language to ChineseSimplified.

    1
    0 Votes
    1 Posts
    545 Views
    No one has replied
  • geektyper for notepad++ ?

    2
    0 Votes
    2 Posts
    1k Views
  • 0 Votes
    4 Posts
    2k Views
    Semper RotoS

    Hey @Meta-Chuh and @guy038,
    that’s some great news you sharing. I certainly will look into this.
    Thanks for the quick help.

    Best regards.

  • Keyboard map chords (e.g., Ctrl+X Ctrl+C)

    16
    0 Votes
    16 Posts
    6k Views
    Mikhail VM

    @Alan-Kilborn said:

    editor.styleSetBack(STYLESCOMMON.LINENUMBER, (255, 0, 0))

    will turn the background of the line-number margin a rather glaring red, for example.

    Yes, changing the line number color is actually better solution in general and it can be better visible.
    I’ve used folder margin from the beginning and just was too lazy to experiment further :)
    BTW, if you want to make permanently visible folder margin in any file, it can be done with Pythonscript plugin via “startup.py” script.

    Disable folder margin:
    Settings - > Preference -> Editing : set “Folder margin style” to “None” Add e.g. this to startup.py: editor.setMarginWidthN (2, 16) # set folder margin to 16 pixel editor.markerDefine (MARKEROUTLINE.FOLDEROPEN, MARKERSYMBOL.ARROWDOWN) editor.markerDefine (MARKEROUTLINE.FOLDERSUB, MARKERSYMBOL.EMPTY) editor.markerDefine (MARKEROUTLINE.FOLDERTAIL, MARKERSYMBOL.EMPTY) ...

    then Restart Npp. So can even define custom marker symbols or just set them all to EMPTY.
    see:
    https://www.scintilla.org/ScintillaDoc.html#Markers
    http://npppythonscript.sourceforge.net/docs/latest/enums.html#markeroutline

  • The strange behavior of the cursor in the Notepad + + window

    39
    0 Votes
    39 Posts
    19k Views
    andrecool-68A

    @SinghRajenM said:
    I do not have such an error

  • I am having trouble with notepad++

    2
    0 Votes
    2 Posts
    566 Views
    Alan KilbornA

    @KOMN-W said:

    I am having trouble with notepad++

    But you didn’t say anything about the trouble you’re having with Notepad++!

  • How to automatic open more files with one click

    1
    0 Votes
    1 Posts
    521 Views
    No one has replied
  • Delete all lines except

    16
    0 Votes
    16 Posts
    6k Views
    Meta ChuhM

    @PeterJones

    since two of the forum’s python experts are not actively helping here anymore, I need to up my PythonScript output …

    i really wished there was an easy way to lure both back somehow … for example with a complementary free cake for all returning members 🥧🍰🎂 :D

    i’ve still got the hope that someday maybe one or both will return for either historic, good times reasons, or 'cause you lured them back with future’s most ultimate py guru knowledge 👍
    (ps: no pressure, i think your py is already pretty good and way better than eg. mine)

    reader’s note:
    this was slightly off topic, so i give my sincere apologies to everyone in advance.

  • Issue when copypasting from excel to notepad++

    Locked
    7
    0 Votes
    7 Posts
    8k Views
    Meta ChuhM

    thanks @PeterJones , now i can reproduce.
    (i barely use excel so i didn’t even now that you can put a tab or a new line in a cell ;-) )

    now i definitively second your first suggestion using regex to replace the pairs of quotes:

    If you only want to get rid of matched quote pairs, then enable search mode = regular expression, and set find what=“([^”]*)" and replace with=$1. (edit: to clarify, the quote marks around the parenthesis are part of the search-string, so you should type those, too)

  • Regex to delete sections of XML

    8
    0 Votes
    8 Posts
    4k Views
    Christopher PhillipsC

    @guy038 said:

    Thanks @guy038 you are a star. I misread and thought everything needed to be on a single line. You new regex works perfectly.

  • Encoding

    5
    0 Votes
    5 Posts
    2k Views
    andrecool-68A

    Sometimes instead of UTF-8 it defines windows-1258

  • How to interpret the coding of macros?

    3
    0 Votes
    3 Posts
    3k Views
    GezaShadG

    Alan, Thank You for your answer!

  • Delete all rows of a text file except company names

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Raymond Lee FellersR

    Thanks to everyone who helped with this question. Each answer contributed to the solution. Special thanks to guy038 who gave me a better understanding of how the code works and his solution worked perfectly.

    Ray Fellers

  • cree un forum

    Locked
    1
    0 Votes
    1 Posts
    425 Views
    No one has replied
  • Disable document switching when mouse4 is pressed

    Locked
    9
    1 Votes
    9 Posts
    2k Views
    Mikhail VM

    @trace-calvin
    XButton1 - 4th mouse button. Typically performs the same function as Browser_Back.
    XButton2 - 5th mouse button. Typically performs the same function as Browser_Forward.

    So NPP cycles back through tabs on both Browser_back event and Xbutton1 event. I didn’t find any option to disable or change it. If it bothers, you can use Autohotkey script to change this button, or block completely with this script:

    #If winActive("ahk_exe notepad++.exe") XButton1::return
  • Search result window

    Locked
    6
    0 Votes
    6 Posts
    1k Views
    guy038G

    Hello, @олег-выползов,

    Just one question :

    When you just mouse select this string $c_word, in current file, do you see, in the status bar, at the bottom of N++ window, the indication Sel 7|1 ?

    If you get a value above 7, this would mean that the string $c_word, itself, contains one or several invisible chars !

    Best Regards,

    guy038

  • Encodage

    10
    0 Votes
    10 Posts
    5k Views
    Meta ChuhM

    @guy038

    there’s more than that broken with the current auto detection !
    same vietnamese detection happens if you save the word “Réservation” to a new utf-8 file and reopen,

    so only the combination of ï and é in the same document is detected correctly, é only will detect it as vietnamese

    this did not happen prior to this commit that @Eko-palypse mentioned.

    You may, also, convert your file to the UTF-8-BOM encoding

    this is not possible in many cases, because those files like in this case are in an open source repository.

    same with spanish, exept if i have an ñ in my documents, so i didn’t notice it before, as most of them have an ñ.
    german characters work ok so far.

  • Can I find missing lines with regular expression?

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    Robin CruiseR

    sorry, both regex are working fine. Thank you very much.

  • Just started using Notepad++... What is SYN?

    7
    0 Votes
    7 Posts
    12k Views
    Aladin ZAIRA

    I am using Autohotkey, and what worked for me is adding an ‘$’ before the hotkey as in ‘$^v::’ (Ctrl+v). Read about the prefix ‘$’ here: https://www.autohotkey.com/docs/Hotkeys.htm