• How to change Tab key behavior

    6
    0 Votes
    6 Posts
    2k Views
    PeterJonesP

    @Hellena-Crainicu ,

    Those are the keystrokes for indenting or unindenting while editing. The original post (from three years ago, which was already sufficiently and correctly answered) was asking how to change whether the Tab key would insert spaces or ASCII tab characters, not asking how to indent or unindent.

  • Keyboard shortcut for going to Tab #1

    4
    0 Votes
    4 Posts
    4k Views
    PeterJonesP

    @Hellena-Crainicu ,

    Those are the keystrokes for indenting or unindenting while editing. It has nothing to do with this 4-year-old question about how to change tabs (that is, change which file is active when you have multiple files open in Notepad++), which was already correctly and completely answered four years ago.

  • Assigning a Shortcut Key to Python script.

    2
    0 Votes
    2 Posts
    165 Views
    Terry RT

    @Luis-Piña-III said in Assigning a Shortcut Key to Python script.:

    I installed Python script and successfully created a new script but have no idea how to assign a shortcut to it.

    Well an obvious place to look might have been the FAQ posts, specifically:
    this post.

    Terry

  • Insert new lines

    5
    0 Votes
    5 Posts
    277 Views
    Les forges de CalianeL

    hello @gerdb42

    It works very well. your kungfu is powerful. thank you very much for the help. and thank you for the link, I will look into it.

  • Pop-under during install

    2
    1 Votes
    2 Posts
    162 Views
    Alan KilbornA

    @Graham-Norris

    The place to report bugs is found by reading HERE.

  • Remove duplicates if only part of the string matches

    13
    0 Votes
    13 Posts
    886 Views
    Jim DaileyJ

    I made some silly mistakes (several syntax errors) in the AWK script above. Also, the additional code in the END block won’t print the total number of times each prefix appeared as I intended. This script does, however:

    { split($0, Parts, /:/) # Parts[1] <- text before the ":". if (!(Parts[1] in Prefixes)) { # If we've NOT seen this prefix ... print Parts[1] # ... print it. } Prefixes[Parts[1]]++ # Count this prefix. } END { for (p in Prefixes) { # Print # of times we saw each one. printf("Prefix '%s' appeared %d times.\n", p, Prefixes[p]) } }
  • search something and replace it with the file name of the file at hand

    10
    0 Votes
    10 Posts
    733 Views
    Christos Glavopoulos - adjuster GRC

    @Terry-R said in search something and replace it with the file name of the file at hand:

    @Christos-Glavopoulos-adjuster-GR

    With a test file open in Notepad++ complete the following:

    Menu option Macro, then Start Recording. Ctrl + Home key. This places the cursor at the very start of the file. Use the Find function with the string/regex (see Note-1 below) to find the string. Click on Find Next, then click Close. So at this point the string you are searching for should be highlighted. Menu option Edit, then select Copy to Clipboard. At this point you need to identify which sub-option you want. It will most likely be “Copy Current Filename”, but you may want the first option “Copy Current Full File Path” which includes the path with the filename. Ctrl + V. Paste the clipboard content to the current cursor position. Ctrl + S then Ctrl + W. Save current file and then close current file. Menu option Macro, then Stop Recording.

    I have tried your solution @Terry-R and it worked like a charm.

    Many many Thanks

    Christos

  • Data corrupt after upgrade to 8.6.9

    2
    0 Votes
    2 Posts
    177 Views
    mkupperM

    @TwiceCake said in Data corrupt after upgrade to 8.6.9:

    I have important notes.

    The content is all disappear.

    Does anyone encounter same problem too?

    Yes, a key common element is people who fail to back up or make copies of their important notes.

    Take a look at FAQ: Periodic Backup vs AutoSave as it’s possible you had already enabled one of the backup mechanism that are available for Notepad++.

  • Searching a file for numbers with a specific number of digits.

    6
    0 Votes
    6 Posts
    1k Views
    Mark OlsonM

    logi-tech said:

    What If I wanted to search for a specific number for example : 3XXXXX5849

    This user has asked the same question three times in three different threads. At this point, I’m pretty sure they’re a bot fishing for upvotes.

    We should stop dignifying them with replies until they prove they’re human.

  • I'm trying to find specific numbers.

    2
    -1 Votes
    2 Posts
    122 Views
    Mark OlsonM

    @logi-tech
    Use the Find/replace form (Search->Find... from the main menu).
    Find what: 3[0-9]{5}5849
    Search Mode: Regular Expression

    Here’s a useful reference on the regular expression I wrote. You could also use 3\d{5}5849 for the same effect.

  • Notepad++ for. Android

    3
    0 Votes
    3 Posts
    357 Views
    Arthur VerburgA

    @Ekopalypse said in Notepad++ for. Android:

    @Arthur-Verburg

    Is there any way to have notepad++ working in android?

    No, because Npp relies on the Windows API.

    If not so is there something like it?

    I don’t know.

    Thank you

  • Notepad 8.6.9 bug using Windows 7

    2
  • bug: deletion of text by tab/enter

    8
    0 Votes
    8 Posts
    653 Views
    Emm NE

    Had the same issue… was creating a new cmd file, edit, and then the first line would just clear one pressing Enter, removed the scintilla commands for enter and tab and seems to work fine. Issue came out of the sudden, last intervention I did was adding autohotkey support. Thanks, A Former User!

    On a 2nd note, it introduced a new bug, new line is now not CRLF but CR only regardless of the settings. So I’ve removed the shortcut entries for the scintilla on the changes made prior, all are default now, but that batch enter bug will eventually return.

  • I have trouble with notepad++

    4
    0 Votes
    4 Posts
    210 Views
    PeterJonesP

    @x-RushRix

    It works for me.
    770ca08f-4e0e-4b13-b910-10f14ceb9843-image.png

    What theme are you using? What is your Settings > Style Configurator > Language: Global Styles > Style: Selected text colour setting (the one I showed in the screenshot)

    If you are using multiple selections at the same time, then what’s your Style: Multi-selected text colour setting, as shown here:
    bfa480d4-5492-421a-8834-cb6dcdce4438-image.png

    It may be that your theme is out of date, and missing some of the newer styles (like the Multi-selected text colour). If you are missing any of the entries in the Style: column as compared to my Style Configurator screenshots, you will want to follow the instructions that I give to Bas de Reuver in this post in the “No text on selected line” discussion.

    Also, there are known issues with the plugins CSV Lint and Compare Plus – and others may have a similar problem as well – as was discussed in the full “No text on selected line” discussion: in the screenshots in the first post there, you can see that the selection actually caused the text to be hidden, even though the Style Configurator had values for a normal selection. That’s one of the reasons I asked for your ? > Debug Info – so that we could see if you are using one of the known-problematic plugins; unfortunately, you chose to not answer that question. If you don’t have “CSV Lint” or “Compare Plus” plugins, you might want to follow the steps in this FAQ to narrow down which plugin might be the culprit.

  • 0 Votes
    3 Posts
    366 Views
    mkupperM

    @Michael-Madison said in Replacing A unique ID value with another based on a reference table in multiple text files:

    I am sure this has been covered, in one way or another, but the searches come up with very code heavy solution that leave me clueless, and I have zero idea what i am doing.

    Unfortunately, the problem you described is best dealt with using either code or a data management tool. Notepad++ is a text editor. While you can use Notepad++'s search/replace to do some crude data management tasks you end up with stuff that is both hard to create and harder to maintain.

    I’ll use the idea proposed by @Mark-Olson and show this example. Let’s say we have a list of ten 6-digit WELL numbers and their corresponding 14-digit numbers.

    729647 01816277784739 832291 05203379882010 323016 08529698086864 852429 25301745193483 613474 43535571764114 421123 69712418942707 495790 62415119153289 901250 16906577703160 214509 29859837478695 936045 11344788176363

    A search/replace on multiple files of:
    Search: (?-i)(?<=^WELL,")(?:(729647)|(832291)|(323016)|(852429)|(613474)|(421123)|(495790)|(901250)|(214509)|(936045))(?="$)
    Replace: (?1(01816277784739))(?2(05203379882010))(?3(08529698086864))(?4(25301745193483))(?5(43535571764114))(?6(69712418942707))(?7(62415119153289))(?8(16906577703160))(?9(29859837478695))(?10(11344788176363))

    will translate files containing

    WELL,"729647" WELL,"832291" WELL,"323016" WELL,"852429" WELL,"613474" WELL,"421123" WELL,"495790" WELL,"901250" WELL,"214509" WELL,"936045"

    into files containing

    WELL,"01816277784739" WELL,"05203379882010" WELL,"08529698086864" WELL,"25301745193483" WELL,"43535571764114" WELL,"69712418942707" WELL,"62415119153289" WELL,"16906577703160" WELL,"29859837478695" WELL,"11344788176363"

    You can expand that search/replace to deal with 20, maybe 30, translations at a time. The issue is that there’s a 1000 to 2000 character limit how long search/replace expressions can be. My example works for dealing with ten values at a time. I did not push the concept to see what the limit is. You said you had thousands of values meaning you would need to construct dozens, and possibly hundreds, of search/replace operations and to run them on all the data files.

    This is an area where code shines vs dealing with it in Notepad++ alone as code can easily deal with translating a value such as 421123 into the desired 69712418942707. You run that on all your files and you will have the 14-digit WELL values.

  • Searching youtube

    6
    0 Votes
    6 Posts
    309 Views
    Marc HoppinsM

    @PeterJones said in Searching youtube:

    Thanks. I feel sure I did that variation yesterday. Anyway, it now works (again).

  • Is there a magic word combination for 100% accurate file auto-encoding?

    3
    0 Votes
    3 Posts
    201 Views
    notdodgeballN

    You can create a macro and assign it a shortcut. If going for the script path, using PythonScript would be:

    notepad.menuCommand( MENUCOMMAND.FORMAT_DOS_866 )

    But then it will be executed for every opened file, unless you code some conditionals, that’s why I would prefer the macro.

  • 1 Votes
    7 Posts
    1k Views
    guy038G

    Hello, @asapRepsnp, @coises, @terry-r and All,

    I think that an elegant solution would be to use the generic regex, exposed in this post :

    https://community.notepad-plus-plus.org/topic/22690/generic-regex-replacing-in-a-specific-zone-of-text/1?lang=fr

    Note that, to take in account the two types of your INPUT text, I used this leading regex part :

    (?-is:^Message-ID:(?:|\R)\x20<.{4}

    With the non-capturing alternative (?:|\R) which means : nothing or a line-break, between the colon char after Message-ID and the space char before the < character !

    So :

    Open your file in Notpead++

    Move the caret ( cursor ) :

    At the very beginning of your file ( Ctrl + Home )

    On a line, or the first line, beginning with Message-ID

    Open the Replace dialog ( Ctrl + H )

    Uncheck the Wrap around box option

    Then, with this complete regex S/R, below :

    SEARCH (?-is:^Message-ID:(?:|\R)\x20<.{4}|(?!\A)\G).*?\K.(?=.*.{4}@)

    REPLACE _

    The INPUT example text, below :

    Message-ID: <S3HC1075.C9B9D2W4@...> Message-ID: <F2CA98A6AWK-LDLL2WQVUFZWSA-8N4-O2WAX-DHGJ2@x> Message-ID: <20230112021536.D44C04F585AAECBA@...> Message-ID: <CAAGbbBVLx-B8sc2ifvzrHEUHTYEvSxkK5=OcDWxk=UKM3eMo2g@...> Message-ID: <347545688.95523.1695404577920.JavySail.boot@...> Message-ID: <S3HC1075.C9B9D2W4@...> Message-ID: <F2CA98A6AWK-LDLL2WQVUFZWSA-8N4-O2WAX-DHGJ2@x> Message-ID: <20230112021536.D44C04F585AAECBA@...> Message-ID: <CAAGbbBVLx-B8sc2ifvzrHEUHTYEvSxkK5=OcDWxk=UKM3eMo2g@...> Message-ID: <347545688.95523.1695404577920.JavySail.boot@...> Message-ID: <B7B207D39A1D4104860D8073A027CCD51DACD65B146E@...> Message-ID: <286f14f5-bb9d-4c26-ae24-2d4ae7484bb3@...>

    Is automatically changed as the following OUTPUT text :

    Message-ID: <S3HC_________D2W4@...> Message-ID: <F2CA__________________________________HGJ2@x> Message-ID: <2023_______________________ECBA@...> Message-ID: <CAAG___________________________________________Mo2g@...> Message-ID: <3475___________________________________boot@...> Message-ID: <S3HC_________D2W4@...> Message-ID: <F2CA__________________________________HGJ2@x> Message-ID: <2023_______________________ECBA@...> Message-ID: <CAAG___________________________________________Mo2g@...> Message-ID: <3475___________________________________boot@...> Message-ID: <B7B2____________________________________146E@...> Message-ID: <286f____________________________4bb3@...>

    Using the free-spacing mode, with the leading (?x) modifier, your search regex would become :

    SEARCH (?x) (?-is: ^ Message-ID : (?: | \R) \x20 < .{4} | (?! \A) \G) .*? \K . (?= .* .{4} @)

    For identical replacements, of course !

    Best Regards,

    guy038

  • Adding a plugin command to the toolbar

    2
    0 Votes
    2 Posts
    334 Views
    PeterJonesP

    @Нело-Анджело ,

    I guess I’m not sure what you’re asking for. In Lua Script v0.12, which is the active version, and has been for quite some time, the Plugins > LuaScript menu already has an Execute Current File command that works.

    79604b8f-d295-4aed-9b5d-8d0f41946501-image.png

    You can even use the Settings > Preferences > Shortcut Mapper > Plugins to assign a keyboard shortcut to that command, so that you can run it while you are editing the .lua script without using a menu.

    Since you brought up the “console”, are you saying you want a button in the console panel, which also runs the current command? As far as I know, there isn’t a way to do that. If you would like to make a feature request for that, that plugin has an issue tracker where you can make feature requests.

  • associate highlighting with the "copy" command

    6
    0 Votes
    6 Posts
    642 Views
    michel MICHELM

    @PeterJones
    Hi peterjones,
    you understood me perfectly. I saw that there is also AutoclipX but haven’t tested it yet. and it’s general to Windows not specific to Notepad++.
    anyway,
    thanks again peterjones.