• Open Notepad++ in Different Workspace Without Switching

    2
    0 Votes
    2 Posts
    473 Views
    wonkawillyW

    Probably you need to play a bit with
    Menu Settings > Preferences > Multi-Instance & Date > Multi-instance settings
    and see the option that best fits your needs.

    Screenshot follows:

    47e4f287-5320-464d-b73e-2c2592a08b44-image.png

  • plugin that support auto-numbering

    23
    0 Votes
    23 Posts
    5k Views
    BobbstermanB

    Tiny improvement (IMO) for bullet list: now it only copies spaces, no punctuation:

    from Npp import editor, SCINTILLANOTIFICATION import re class NA(object): def __init__(self): self.eol = ['\r\n', '\r', '\n'][editor.getEOLMode()] editor.callback(self.callback_sci_CHARADDED, [SCINTILLANOTIFICATION.CHARADDED]) def callback_sci_CHARADDED(self, args): if chr(args['ch']) == self.eol[-1]: caret_pos = editor.getCurrentPos() curr_line_num = editor.lineFromPosition(caret_pos) if curr_line_num > 0: prev_line = editor.getLine(curr_line_num - 1) m = re.match(r'\s*(\d+)([^\w\r\n]+)', prev_line) if m: full = str(m.group(1)) + str(m.group(2)) full_prev = prev_line.rstrip('\r\n') if (len(full_prev) > len(full)): # if m: prev_number = int(m.group(1)) symbols_after = m.group(2) new_number = prev_number + 1 text_to_insert = str(new_number) + symbols_after editor.insertText(caret_pos, text_to_insert) new_caret_pos = caret_pos + len(text_to_insert) editor.setEmptySelection(new_caret_pos) return m = re.match(r'\s*(\+)([\s*]+)', prev_line) if m: full = str(m.group(1)) + str(m.group(2)) full_prev = prev_line.rstrip('\r\n') if (len(full_prev) > len(full)): # if m: bullet = m.group(1) symbols_after = m.group(2) text_to_insert = bullet + symbols_after editor.insertText(caret_pos, text_to_insert) new_caret_pos = caret_pos + len(text_to_insert) editor.setEmptySelection(new_caret_pos) return if __name__ == '__main__': try: na except NameError: na = NA()
  • Error on type anything

    Locked
    12
    0 Votes
    12 Posts
    1k Views
    PeterJonesP

    @Mark-Olson said in Error on type anything:

    @Tebi-Sa
    I’m getting ChatGPT vibes from your answer. Strongly suggest not using AI tools to answer questions in this forum

    It’s not just a strong suggestion: it is one of the rules of the forum:

    To maintain a high quality of posts, accounts which post spam and accounts which post significant technical nonsense may be banned, at the moderators’/administrators’ discretion. (Being wrong is not grounds for banning; but persisting in posting misleading or confusingly-wrong posts, or persisting in using Generative AI (like ChatGPT) or similar programs to create posts, is grounds for banning.) - https://community.notepad-plus-plus.org/topic/21965/please-read-this-before-posting
  • Copy Link in Caret /w Ctrl+P (LuaScript)

    11
    0 Votes
    11 Posts
    552 Views
    guy038G

    Hi, @mpheath and All,

    I confirm that the command npp.AddShortcut(... works ONLY when appended to startup.lua and do not work in a separate Lua file !

    And, this time, after restarting N++, the new options Copy this link Ctrl+Alt+2 and Copy this link Ctrl+Alt+3 were present in the Lua sub-menu and did the job, correctly

    Finally, as this command is already included in the contextMenu.xml, I suppose that any script, whatever it is, that mimics the Copy link function, seems useless !

    Again, thank you very much, @mpheath, for your support !

    Best Regards,

    guy038

  • Please recommend encryption plug-in

    3
    0 Votes
    3 Posts
    963 Views
    Tony FT

    @PeterJones thanks v much

  • Issues with Vertical Edge Setting + User Defined Language

    2
    0 Votes
    2 Posts
    169 Views
    ?

    Edit: I fixed this, in case anyone has any issues with it later. I just had to uncheck global font size.

  • Notepad++, windows 11 and pythonscript

    9
    0 Votes
    9 Posts
    484 Views
    ThosRTannerT

    @Ekopalypse working great now. thank you!

  • Line select problem

    9
    0 Votes
    9 Posts
    1k Views
    PeterJonesP

    @Michael-Lander said in Line select problem:

    @guy038 this is great! I cannot, however, find any shortcuts.xml to drop them into.

    %AppData%\Notepad++\shortcuts.xml

    See FAQ

  • How do I copy my settings to a new computer

    4
    0 Votes
    4 Posts
    765 Views
    Mark OlsonM

    @ThosRTanner
    Should be the contents of the %Program Files%\Notepad++\plugins folder.

    Note that most plugins have a bunch of app data in %Appdata% as well, which will be copied along with everything else if you do as PeterJones directed.

  • append data before and after text

    5
    0 Votes
    5 Posts
    242 Views
    namx3249N

    yes, i know ffmpeg but already tried for strange site and does not work
    because from m3u8 to this site only segments are present but missing the full link (first) and token at the end (see my first post above), so ffmpeg don’t have link for its download

  • Keyboard Shortcut in Windows Context Menu

    3
    0 Votes
    3 Posts
    346 Views
    Max StoneM

    @PeterJones Alright, thank you for the reply; and the FYI, that’s good to know.

  • Is there a good css class parser?

    8
    0 Votes
    8 Posts
    762 Views
    Markus KrauseM

    @Jeffrey-Cobb

    Try this, its better and fast:

    <?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <functionList> <parser id="css_comment" displayName="CSS Comment" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"> <function mainExpr="^([:#\.\w][^\{]+\{[^\}]+\})" displayMode="$functionName"> <functionName> <nameExpr expr="^([:#\.\w][^\{]+)"/> </functionName> </function> </parser> </functionList> </NotepadPlus>
  • regex search replace

    12
    0 Votes
    12 Posts
    697 Views
    Thomas-OlivierT

    I put it in appdata and the one from the main D:\Notepad++\shortcuts.xml I removed.

    A big thank you to @guy038. It works flawlessly.

  • Better CSV columns?

    4
    0 Votes
    4 Posts
    5k Views
    CoisesC

    You might be able to use my plugin Columns++ to help with this. See the help sections on Elastic tabstops and the Convert separated values to tabs… command.

    Elastic tabstops is a conceptually simple algorithm defined by Nick Gravgaard for aligning tab-separated text. It works by treating each tab as a column separator and then making each column just large enough to hold its contents, much like the way a simple HTML table works.

    In most cases, Convert separated values to tabs should be able to transform a csv file into tab-separated values without confusion.

    There are some other handy functions in the plugin for working with data arranged in columns as well.

    I currently consider the plugin to be in an “alpha” state. I use it, and I haven’t been seeing many problems reported, but it could be that hardly anyone is using it. If you use it, please let me know if you encounter any problems.

  • I need to insert a special character at the beginning of a line

    3
    0 Votes
    3 Posts
    632 Views
    JustinJudoJ

    @PeterJones Thank you Peter, I appreciate the solution. Man you’re so good with this stuff… I wish I knew how to do RegEx. I’ve looked it before but it just seem so difficult to learn!

  • Protect Lines Within Tabs

    8
    0 Votes
    8 Posts
    645 Views
    EkopalypseE

    @Alan-Kilborn @Coises

    without having more information about how exactly such a feature is supposed to work, it’s hard to say whether locking part of a text with this style attribute is sufficient. For example, if this “locking” only happens after several edits, I’d be surprised if a few “undos” didn’t reset the text. Never tested it.

    @Douglas-Schneider - there is a possibility that a Python script could be used via the PythonScript plugin, but one would need more information on how it should work.
    Questions I’m thinking of include.
    Are the files only on the hard drive or also on the network, on a USB drive, etc.?
    Is the file only ever edited by one person, or perhaps multiple users?
    Is the area locked when the file is loaded or at any time?
    Does only text need to be locked for files that don’t use another lexer, e.g. text doesn’t have a lexer, but xml or json files do.
    What must be done when ending a npp session or closing the file or starting npp and loading a file?
    Etc …
    If you can specify your requirement and are willing to go the a python script solution way, we might be able to offer you something.

  • Find with regex a particular word between 2 lines

    6
    0 Votes
    6 Posts
    310 Views
    Vasile CarausV

    @wonkawilly I need a regex, because I wanna FIND and REPLACE in several html files…

    I find a solution, super

    FIND: </table>\r\n\K(<.*>)|K\r\n<p class="text_obisnuit">

    interesting is that I used K instead of \K

  • Bana yardım edin lütfen

    11
    0 Votes
    11 Posts
    392 Views
    PeterJonesP

    @İhsan-Akdaş said in Bana yardım edin lütfen:

    but everyone I watch videos can edit it,

    I just noticed this statement: you should re-watch the video, because a rewatch will probably show you that you picked the wrong file to edit, or it will show you how the video said to make the changes.

  • Shell extension multiple files behavior change

    2
    0 Votes
    2 Posts
    174 Views
    PeterJonesP

    @fixmypcmike ,

    Starting in v8.5.1, the way the context menu was done was changed to work with win11, but has been having trouble with older versions of Windows. Subsequent releases have been trying to fix it for “everyone” with varying levels of success.

    Unfortunately for you, Win7 is not supported by Notepad++, so while it will hopefully soon work for win8.1 and newer, it may be that it won’t ever be in your default context menu on your decade-out-of-date OS. Of course, it’s really easy to manually add it to your registry yourself on Win7… ( use the forum search for registry and put my username as the author in the search advanced options, and you should find an example from me some years back.)

  • Screen location when Notepad++ restarts

    8
    0 Votes
    8 Posts
    1k Views
    Alan KilbornA

    @mkupper said in Screen location when Notepad++ restarts:

    Alt+spacebar to activate the shortcut menu is also useful to help locating a hidden or lost application as it will pop up on the edge of the monitor nearest to where the application is hidden or parked.

    Yes, this is a good tip, as it gives one a hint in what directional arrow to use (if one’s going to use the keyboard) in order to get the app back on-screen. However, if it is “far” away, the user may hold down the arrow key for a LONG time and think it isn’t working…