• I want to cut a specific range

    6
    0 Votes
    6 Posts
    4k Views
    guy038G

    Hello, @김성찬 and All,

    An other and easy solution is to use the Begin/End Select feature !

    1 Left click at the very beginning of the first line 0000 90 9F 33 .. .. .., to move the caret to this location

    2 Select the option Edit > Begin/End Select

    3 Use the Ctrl + End shortcut to get the very end of your hexadecimal dump text

    4 Press and hold down the ALT key and left click after the 16th hexadecimal byte of the last line

    5 Select, again, the option Edit > Begin/End Select

    => After a while, needed to process 400,000 lines about, as you said, you should notice this big rectangular selection !

    6 Simply, press the Delete key

    Voila :-))

    Best Regards,

    guy038

    P.S. :

    If you forget to hold down the ALT key, at step 4 of the method above, you, obviously, get a normal selection of all your text !

  • Syncing unread files between cloud synced devices

    6
    0 Votes
    6 Posts
    1k Views
    EkopalypseE

    @PeterJones

    f355847c-96d5-416f-9554-5fdb80611ff0-image.png

  • Keyword prefix constraint possible ?

    11
    0 Votes
    11 Posts
    451 Views
    EkopalypseE

    @Klasen-Eric

    So my understanding is, that you run it once, right?
    And after executing you got your main print statement in the console, correct?
    After that, you need to activate the buffer aka clicking into it or switching
    from another document into the one which should be handled and then
    it should start coloring your regex matches.
    Did you ensure that the match group is 0? Only if you used G\d+.
    If you used something like
    G0(\d+) and you are interested to get the digit colored which follow G0
    you would need to use match group 1.
    So for example this

    regexes[(0, (79, 175, 239))] = (r'G\d+', 1)'

    would be an error as no match group 1 gets created

    either use this

    regexes[(0, (79, 175, 239))] = (r'G\d+', 0)'

    or that (which really doesn’t make sense in this case but …

    regexes[(0, (79, 175, 239))] = (r'(G\d+)', 1)'
  • I want to sort text phrases by their number of words

    5
    0 Votes
    5 Posts
    433 Views
    guy038G

    Hi, @thunderdog, @peterjones and All,

    Peter, nice shot , too ! As a sort was necessary, I simply thought about a second regex S/R. But you’re right, we can perfectly use a composite regex to get all the job done ;-))

    So, the road map is :

    Perform the regex S/R, twice

    Run the alphabetic ( Unicode ) ascending sort

    Perform the same regex S/R, once again

    Note that I also slightly shorten your search regex ! Here is the final solution :

    Assuming the initial text of @PeterJones, normalized in two lines, which does end with either a dot, an exclamation mark or an question mark !

    The day was very difficult today. I hope the next few days get better. Do you hope the same? I hope you hope the same as me! Hello, world! This sentence is just ten teeny-tiny words long, silly goose! No?

    SEARCH (?-s)^#+\t(.+)#$|\w+[^\w\r\n]*(?=.*\t)|\h*(.+?[.?!])(?!#)

    REPLACE ?2\2\t\2#\r\n:?1\1:#

    After two clicks on the Replace All button, we obtain :

    ###### The day was very difficult today.# ######## I hope the next few days get better.# ##### Do you hope the same?# ######## I hope you hope the same as me!# ## Hello, world!# ########### This sentence is just ten teeny-tiny words long, silly goose!# # No?#

    Now, we click on the Edit > Line Operations > Sort Lines Lexicographically Ascending option and get :

    # No?# ## Hello, world!# ##### Do you hope the same?# ###### The day was very difficult today.# ######## I hope the next few days get better.# ######## I hope you hope the same as me!# ########### This sentence is just ten teeny-tiny words long, silly goose!#

    Let’s go back to fhe Replace dialog , again and use the same S/R

    SEARCH (?-s)^#+\t(.+)#$|\w+[^\w\r\n]*(?=.*\t)|\h*(.+?[.?!])(?!#)

    REPLACE ?2\2\t\2#\r\n:?1\1:#

    After one final click on the Replace All button, here is your expected text :

    No? Hello, world! Do you hope the same? The day was very difficult today. I hope the next few days get better. I hope you hope the same as me! This sentence is just ten teeny-tiny words long, silly goose!

    Wow… Awesome !

    And if we want to get all that text in a single paragraph, just apply this last regex S/R !

    SEARCH ^\R|(\R)

    REPLACE ?1\x20

    giving :

    No? Hello, world! Do you hope the same? The day was very difficult today. I hope the next few days get better. I hope you hope the same as me! This sentence is just ten teeny-tiny words long, silly goose!

    Best Regards,

    guy038

  • Action on current selection

    9
    1 Votes
    9 Posts
    856 Views
    Alan KilbornA

    @asvc

    Security is indeed an important concern in current and future times.
    Perhaps you should not use Notepad++ at all, unless/until all possible holes in Notepad++ and Windows are addressed.

  • How to replace intrementally?

    25
    0 Votes
    25 Posts
    2k Views
    guy038G

    Hello, @alan-kilborn,

    Of course, it’s been more than 25 years since I really practice AWK. It was on an HP-Unix server that would be laughed at, nowadays !

    I have already praised, several times, the precision and power of regexes, which, in a few words, produce great effects !

    For the same reasons, it seems that I am simply impressed by the AWK language ;-))

    Cheers,

    guy038

  • Character II

    7
    0 Votes
    7 Posts
    916 Views
    Alan KilbornA

    @dail said in Character II:

    My personal rule any more is I’ll usually put in as much effort as the person I’m replying to. :)

    That’s an extremely reasonable criterion.
    A lot of postings would go unanswered, though. :-)

  • VIM-like search

    8
    0 Votes
    8 Posts
    591 Views
    asvcA

    @Ekopalypse, thanks. Let’s continue in the main topic ?

  • 0 Votes
    6 Posts
    2k Views
    guy038G

    Hi, @banjo-g, @alan-kilborn and All,

    A generic and general form of the regex, described in my previous post, could be :

    SEARCH (?-is)^.*?Expression A(?s).*?Expression B.*?$\R

    Basically, this regex :

    Searches for two lines :

    A line A, containing Expression A, at any location of line A

    A line B, containing Expression B, at any location of line B

    Selects all range of characters, generally multi-lines, from the beginning of line A till the end of line B, with its EOL characters

    The lines A and B may be identical. However, in that case, Expression B must be located after Expression A, in current line !

    Notes :

    First, the in-line modifier (?-is)

    Carries a non-insensitive search ( so sensitive to case )

    Forces the regex engine to interpret the regex dot symbol . as matching a single standard character ( not EOL ones )

    Then, the part ^.*?Expression A matches, from beginnning of line, the shortest range, possibly null, of standard characters, followed by Expression A, with that exact case

    Now, the part (?s).*?Expression B looks for the shortest range, possibly null, of characters, including EOL, followed by Expression B, with that exact case

    Finally, the part .*?$\R searches for the shortest range, possibly null, of characters till an end of line, followed with its line-break

    Cheers,

    guy038

  • How to update Notepad++ via Zip/7z without losing your settings

    2
    0 Votes
    2 Posts
    328 Views
    EkopalypseE

    @Lifthil_

    I use two batch scripts like described here.

  • Replacing number with another Incrementing #

    18
    0 Votes
    18 Posts
    12k Views
    astrosofistaA

    @Alan-Kilborn

    May it be, mine was just a disclaimer, as I know almost nothing about Python :)

  • Double click no longer opening links. Newest version

    2
    0 Votes
    2 Posts
    534 Views
    PeterJonesP

    @Justin-Hess-0 ,

    I cannot replicate your problem. I am using v7.8.6, with ? > Debug Info =

    Notepad++ v7.8.6 (64-bit) Build time : Apr 21 2020 - 15:23:03 Path : C:\usr\local\apps\notepad++\notepad++.exe Admin mode : OFF Local Conf mode : ON OS Name : Windows 10 Enterprise (64-bit) OS Version : 1903 OS Build : 18362.720 Plugins : ComparePlugin.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll PreviewHTML.dll PythonScript.dll QuickText.dll XMLTools.dll

    dd7c7adf-9952-4528-a8d6-62d30249c6a4-image.png

    I have Chrome as my default browser.

    When I double-click on a link, it opens that link in Chrome.

    Maybe you should try turning off Clickable Link Settings, exit all instances of Notepad++, run one instance of Notepad++, enable the setting again, and see if it works. Then exit and run again and make sure it still works.

    If it doesn’t work for you, you will have to give us more information, including the ? menu Debug Info, like I showed above.

  • Recognise the PDB/CIF file for the protein structures from RCSB website

    3
    0 Votes
    3 Posts
    457 Views
    Tullio FotiT

    You can try to create a UDL definition for PDB file format.
    However PDB is not a programming language so I tried to use the comment folding to achieve your need.
    Create a file pdb.xml (as below) and put it in userDefineLangs folder

    <NotepadPlus> <UserLang name="PDB Protein Data Bank" ext="pdb" udlVersion="2.1"> <Settings> <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" /> <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" /> </Settings> <KeywordLists> <Keywords name="Comments">00SOURCE 00REMARK 00HELIX 00SEQRES 00ATOM 00SHEET 01 02 03 04</Keywords> <Keywords name="Numbers, prefix1"></Keywords> <Keywords name="Numbers, prefix2"></Keywords> <Keywords name="Numbers, extras1"></Keywords> <Keywords name="Numbers, extras2"></Keywords> <Keywords name="Numbers, suffix1"></Keywords> <Keywords name="Numbers, suffix2"></Keywords> <Keywords name="Numbers, range"></Keywords> <Keywords name="Operators1"></Keywords> <Keywords name="Operators2"></Keywords> <Keywords name="Folders in code1, open"></Keywords> <Keywords name="Folders in code1, middle"></Keywords> <Keywords name="Folders in code1, close"></Keywords> <Keywords name="Folders in code2, open"></Keywords> <Keywords name="Folders in code2, middle"></Keywords> <Keywords name="Folders in code2, close"></Keywords> <Keywords name="Folders in comment, open"></Keywords> <Keywords name="Folders in comment, middle"></Keywords> <Keywords name="Folders in comment, close"></Keywords> <Keywords name="Keywords1">HEADER KEYWDS </Keywords> <Keywords name="Keywords2">TITLE KEYWDS REVDAT AUTHOR CISPEP COMPND DBREF</Keywords> <Keywords name="Keywords3">ALA ARG ASN ASP CYS GLN GLU GLY HIS ILE LEU LYS MET PHE PRO SER THR TRP TYR VAL</Keywords> <Keywords name="Keywords4">EXPDTA JRNL</Keywords> <Keywords name="Keywords5">ORIGX SCALE CRYST </Keywords> <Keywords name="Keywords6"></Keywords> <Keywords name="Keywords7"></Keywords> <Keywords name="Keywords8"></Keywords> <Keywords name="Delimiters"></Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="67369984" /> <WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS1" fgColor="FF0000" bgColor="400000" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS2" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS3" fgColor="FFFF80" bgColor="000000" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS4" fgColor="C0C0C0" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS5" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" fgColor="FF0080" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> </Styles> </UserLang> </NotepadPlus>
  • 0 Votes
    2 Posts
    165 Views
    Wolfgang ErdleW

    Sorry. It was my fault!
    I had a file without an extension, so it seemed to be a path without filename!

  • 0 Votes
    5 Posts
    4k Views
    Kouamé Guy Michel KOBENANK

    @PeterJones Sorry. @PeterJones gave me the solution. I’ve started using NotePad++ on my computer when i saw this box.

  • help with this code

    2
    0 Votes
    2 Posts
    137 Views
    Alan KilbornA

    @Alyssa-Desabelle

    You are in luck!
    You will find something which should get you to your answer HERE.

  • Help with LaTeX styling and folding

    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • Bug when opening file and showing requested line

    3
    0 Votes
    3 Posts
    180 Views
    Atlas InformatikA

    Hi, yes, it’s exactly this issue. Just checked now:

    Versions > 7.7: If word wrap is switched on the viewport shows Line 1 instead of the desired line. If it is switched off the positioning works correctly. Version 7.7: Correct line in both cases.

    Nice to have: If the desired line could be positioned about in the middle of the window. Then you see immediately the code above and below the line.

  • Potential bug/undocumented feature?

    3
    0 Votes
    3 Posts
    240 Views
    Tod WulffT

    @Alan-Kilborn Thanks for the time in responding and affirming this behaviour exists on your end. It is appreciated.

    As an aside, I had my shortcuts setup to run as administrator (for editing stuff inside of prog files directories (namely .inis)). This behaviour is counter-intuitive in that when in admin mode, this setting isn’t honored when a new as-admin instance is instantiated. Turning that off and opening new instances (either from tab context, or via command line, or with the setting to always force new instance) seems to resolve the undesired behaviour.

  • como hacer este modelo de pagina porfavor

    3
    0 Votes
    3 Posts
    244 Views
    astrosofistaA

    Hola @Manuel-Korb, @PeterJones, All

    Este es un foro en idioma inglés. En el caso que tengas dificultades con ese idioma, te sugiero que escribas el mensaje en tu lengua materna, que parece ser la española, y luego lo hagas traducir por un servicio online como DeepL.com —tal como yo voy a hacer con este mismo mensaje—. De esta manera las chances de que los regulares de la lista lean tu mensaje y puedan ayudarte aumentarán considerablemente.

    Ahora bien, si la respuesta de @PeterJones es correcta, entonces no queda nada más por decir que desearte mucha suerte con tu proyecto.

    Un saludo.

    Translation

    This is an English language forum. In case you have difficulties with that language, I suggest you write the message in your mother tongue, which it seems to be Spanish, and then have it translated by an online service like DeepL.com -as I am going to do with this very message-. This way the chances that the regulars on the list will read your message and be able to help you will increase considerably.

    Now, if @PeterJones’ answer is correct, then there’s nothing left to say but to wish you good luck with your project.

    Greetings.