• Please Read This Before Posting

    Pinned Locked
    1
    7 Votes
    1 Posts
    7k Views
    No one has replied
  • v8.7 Search Results Missing

    Pinned
    15
    0 Votes
    15 Posts
    5k Views
    xomxX

    This v8.6.9-v8.7.2 issue has been fixed (GitHub commit).
    The fix will be included in the next Notepad++ version (probably v8.7.3).

    @PeterJones
    I would leave this topic pinned for a while longer until the fix reaches most N++ users.

  • HELP: Having trouble with Macros in v8.5.3 or later

    Pinned
    28
    2 Votes
    28 Posts
    17k Views
    Mike NewmanM

    Moderator Note: The contents of this post were moved to a separate topic, Macro works normally, but fails when shortcut is Ctrl+Shift+C, because it’s actually separate from the >=v8.5.3 issue for this Topic.

  • Cursor become black square at line selection

    7
    0 Votes
    7 Posts
    1k Views
    mpheathM

    @Andrzej-Jaworski Possibly yes if want to try the LuaScript plugin.

    Install the LuaScript plugin from the menu Plugins -> Plugins Admin which is just 2 DLL files approximately 1 MB in size. Once Notepad++ is restarted then from the menu Plugins -> LuaScript -> Edit Startup Script which will open startup.lua in the editor.

    Add this code:

    local function EventReady() -- Set SC_CURSORARROW instead of SC_CURSORREVERSEARROW. for i = 0, editor.Margins - 1 do editor.MarginCursorN[i] = SC_CURSORARROW end end npp.AddEventHandler('OnReady', EventReady)

    Notepad++ needs restart before the code in startup.lua will be run.

    I tested it initially without the ready callback event though consider as a good idea to use it so that Notepad++ is in a ready state before applying the user code.

    It appears to work OK as I typically set an inverted arrow which is translucent and I do not see the white reversed arrow over the margins. I have not experienced the black box so cannot state that it is a solution to your problem. If the margin count changes due to plugins adding margins then not sure what may happen though might be better than a black square entirely for all of the margins.

    If you have PythonScript plugin or similar, then possibly could use similar code for that language.

  • Need help with finding and replacing

    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • 2 Votes
    12 Posts
    303 Views
    mpheathM

    @Min-Liu I would like some time to review the php lexer code as the powershell and python lexer shows better performance with the same text pasted under similar test conditions. Perhaps there is some bad code logic preventing good progression of the styling in the php lexer. This needs some proving in some way to recognize the lexer as bugged and will test in SciTE with similar settings to reproduce the bug.

    LuaScript as suggested can help you for now though if the php lexer needs a fix then it should get priority with posting an issue and where it should be posted. This may take some time as the lexer code is complex.

    @PeterJones I just tested in SciTE SC1 version 5.5.8 Scintilla:5.5.8 Lexilla:5.4.6 with idle.styling=3 in SciTEGlobal.properties. It pastes the 50,000 lines without freezing into a .php file. Can you possibly confirm this test as this implies the php lexer is OK in SciTE, yet is not OK in Notepad++. If confirmed, then the lexer seems OK and goes back to being a Notepad++ issue. The idle styling was not the only setting in Notepad++ that was changed. The versions of Scintilla/Lexilla match with Notepad++ 8.9.

    https://scintilla.org/SciTEDoc.html#property-idle.styling

  • Perl keywords "class" and "method" not recognised by Function List

    12
    0 Votes
    12 Posts
    559 Views
    J

    @PeterJones I am happy :)

  • 0 Votes
    3 Posts
    145 Views
    fml2F

    @h-jangra said in Feature Request / Question: Soft Wrap at Vertical Edge (Column 80) regardless of window size:

    I have added this in NppVim plugin [. . .]I am not sure how to set text width in notepad++

    That’s interesting! I’d think that a NP++ plugin can only do things that are also possible in NP++ itself since the underlying engine is the same.

  • How do I change font?

    16
    0 Votes
    16 Posts
    178k Views
    PeterJonesP

    @Cam-K said in How do I change font?:

    Noticed on newer versions of N++ that the “Enable global font” option is gone

    It’s not gone, just at the bottom of the list, because it’s not what most people should be using. See the global override dialog and the user manual for more on why you shouldn’t use it.

  • 0 Votes
    6 Posts
    151 Views
    4614

    @PeterJones Ok, Thank you. I see now Microsoft Excel is the way to go!

  • Macro problem

    3
    0 Votes
    3 Posts
    238 Views
    mpheathM

    @guy038

    https://www.scintilla.org/ScintillaDoc.html#SCI_COPY

    copying data to the clipboard

    Is document to the clipboard.

    https://www.scintilla.org/ScintillaDoc.html#SCI_PASTE

    pasting from the clipboard into the document

    Is clipboard to the document.

    Both functions relate to the document in the editor. The copy function will be good for the task though paste will not work with the search window.

    Instead of SCI_PASTE, could use the Run command to run an executable to insert the clipboard text into the search window.

    AutoIt3 script automate_columns++_search.au3 :

    ; Wait up to 3 seconds for the window. $hSearch = WinWait('Search in indicated region', '', 3) If $hSearch Then $sClip = ClipGet() ; get clipboard text ControlSetText($hSearch, '', 'Edit1', $sClip) ; set combo edit ControlClick($hSearch, '', 'Button7') ; click regex button ControlClick($hSearch, '', 'Button9') ; click count button $sCount = ControlGetText($hSearch, '', 'Static3') ; read label ClipPut($sCount) ; set clipboard text EndIf

    Adjust the title if the window text is localized.

    Compile to executable and then add to Run as a command. Get the command id with NppUISpy and insert into the shortcuts.xml file.

  • 0 Votes
    2 Posts
    166 Views
    PeterJonesP

    See that ︿ above the Name column of the Document List? Like most tabular data tools (spreadsheets, or the data tables in Wikipedia, or what have you), that indicates that the data is being sorted by that column (if you right click, and add the extension column, you can sort by either column). The sort indicator is a 3-state toggle: pointing up ︿ means it’s sorting in alphabetical order, pointing down ﹀ means it’s sorting in reverse-alphabetical, and gone means it’s sorted in the order of your tabs.

    up ︿ down ﹀ none 98a5bc45-296d-41cb-8baf-635e729f540f-image.png 4b34c789-9bf5-4185-8d46-eceebbf07ced-image.png 1a0eadaa-367e-4f37-a2e0-0b84748c5cb1-image.png

    Nothing changed in Notepad++ itself; you just clicked that header once (intentionally or accidentally), so it’s now sorting alphabetically, like it thought you wanted. You just have to click it two more times to get it to match the tab order.

  • Compare plugin, output a list of line numbers that do not match

    3
    0 Votes
    3 Posts
    196 Views
    Robert Or Janet DiebelR

    @PeterJones Thanx, much appreciated.

  • Print colors?

    3
    1 Votes
    3 Posts
    102 Views
    William EdwardsW

    @Coises Perfect! Thank you for your assistance…

  • Enter key duplicated in macros

    14
    3 Votes
    14 Posts
    658 Views
    datatraveller1D

    So with installation of a new notepad 8.9 version, these settings in shortcuts.xml should be updated (maybe automatically with installation):

    from:
    1c3beaba-3b9c-46be-8fff-2f9dace10a63-image.png

    to:
    f08a7ae4-6d8d-486a-89b2-57b79dee1091-image.png

    I’m only a user so I don’t know the details, but maybe simply CR could be changed to 
 and CRLF to 
 (and if existent LF to 
)?

  • What needs to be copied from old to new Notepad++ installation?

    2
    0 Votes
    2 Posts
    74 Views
    PeterJonesP

    @leestwise ,

    For a normal installation, then you can just copy over everything from %AppData%\Notepad++\ from the old to the new (and if you customized any of your autoCompletion, those will have to go from c:\program files\Notepad++\autoCompletion\*.xml on the old to the new… but customizing those is not as common as other customizations)

    (You also, of course, have to install Notepad++, and all the plugins. If you don’t want to use Plugins Admin to do the plugin install, you could just copy from c:\program files\Notepad++\plugins\ on the old to the new… but since many plugins may have been updated, this is a good chance to make sure you’re grabbing the most recent version, rather than just copying over the old-and-possibly-outdated version. And don’t overwrite c:\program files\Notepad++\plugins\config\nppPluginList.dll, as you always want to have the most recent from the installation, not whatever old plugin list was on the old machine.)

  • Turn Off Paragraph Highlighting

    3
    0 Votes
    3 Posts
    103 Views
    CoisesC

    @Craig-W said in Turn Off Paragraph Highlighting:

    How do you turn off the automatic highlighting of anything you are typing. I went to settings and turned de-selected everything under highlighting, and it hasn’t changed anything. I don’t want the background highlighted as I type or have to go to a previous paragraph and it’s all highlighted.

    Try changing Settings | Preferences | Editing 1 | Current Line Indicator to None.

  • 0 Votes
    2 Posts
    79 Views
    PeterJonesP

    1: How can I tell NP++ to search for multiple different text snippets at once? For example all instances of 45/23 31/89 and 21/77 should all be replaced with 66/55

    (a|b|c) will match a or b or c, so for the exact three you said, it would be (45/23|31/89|21/77) as the FIND and 66/55 as the replace.

    But if you’re not describing it well, and you just want any two-digit fractions of the form ##/## to be replaced with 66/55, then it would be \d\d/\d\d (where \d is regex-speak for “any digit”)

    If neither of those is what you really want, you will need to give more examples of what should and shouldn’t match.

    2: How can I tell NP++ to delete the first three lines and the last four lines (the last line is always empty) of a file?

    First three lines: FIND \A(^.*?\R){3} will match the start of file and the first three lines, and replacing that with empty text will delete them.

    Last four: FIND (^.*?\R){4}\Z will match four lines and the end-of-file, so replacing that with empty text will delete them.

    Fancy: do both with the | to say “either/or”, so FIND = \A(^.*?\R){3}|(^.*?\R){4}\Z

    (don’t have . matches newline enabled)

    All of that syntax is described in the User Manual regex section, so if you want more details, you can load that page and use your browser to search for \A or \Z or similar; the concepts used were anchors (for beginning/end of file), multiplying operators (for doing N lines), and groups (so the multiplying operators apply to the entire-line matcher)

    200 files

    Regex will work in the Find in Files, which is how you make it apply to that many files. But try it in one open file first, to make sure it does exactly what you think. And for bulk operations, always keep a backup, in case things don’t go as you expected.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Change or specify plugins directory or folder location

    6
    0 Votes
    6 Posts
    9k Views
    BlastocystisB

    @PeterJones
    As a user of Notepad++ in a highly-controlled corporate environment, Peter’s explanation is lucid, thorough and relevant.

  • Why does my editor has this weird syntax highlighting?

    2