• How to copy all phone numbers with a specific format

    3
    1 Votes
    3 Posts
    248 Views
    Marcos MiguelM

    @Coises THANK YOU SO MUCH!

  • Help with regex: bug?

    4
    0 Votes
    4 Posts
    252 Views
    Alan KilbornA

    By default the regex engine is case insensitive meaning a-z and A-Z are the same.

    it did not occur (to me) that a language like regex with separate options for uppercase and lowercase could have any case insensitivity enabled by default.

    It actually isn’t case sensitive by default. But because the Notepad++ user interface to searching has a Match case checkbox, the state of that become part of the operation. If uncheckmarked when the operation starts, then, well…

    For regex purists, perhaps always starting your regex with (?-i) – which overrides the state of the Match case checkbox – is the way to go.

  • Xdebug connects tothe Dbgp plugin but doesn't work

    6
    1 Votes
    6 Posts
    548 Views
    rdipardoR

    I will wait for feedback on the latest version before updating the distributed plugin list: https://bitbucket.org/rdipardo/dbgp/src/v0.14.2/CHANGELOG.txt

    This thread has already climbed the search engine rankings for Xdebug issues, so I didn’t want to leave the impression that DBGp is unmaintained.

    Lesson learned: Delphi Strings are implicitly passed by reference (as if the type identifier were PChar instead). That means this method would overwrite a validly escaped file URI with the file’s literal path — spaces, backslashes, and all — which the debugger obviously can’t find. Still no luck getting UNC paths to resolve to proper URIs, but that seems to be a known issue with Xdebug itself.

    Simply getting the source command to execute was only the beginning of the trouble. The message parsing code was written for an obsolete spec, when error nodes were simple text elements. Treating them as such was raising DOM exceptions that obscured real debugger errors, and calling methods on a missing node object would cause the occasional access violation. Then I found out the socket destructor would be invoked twice; once when the temporary source map was unloaded, once more when the socket closed, and the second time around it tried to look up the same unloaded file, calling a method on a member object it had already freed.

    All of this came to light only after source mapping started to work, but only for local files in ideal conditions, which makes me wonder about the stability of future releases. The feature set of current versions is definitely crippled, but that also means they can’t fail too dangerously. Like the classic car it really is, DBGp is not for daily driving.

  • notepad++ python 'find all in current document'

    2
    1 Votes
    2 Posts
    404 Views
    Alan KilbornA

    @June-Wang

    I presume you mean you want to use the PythonScript plugin to write some code to do what you’ve asked.

    I also presume that you want the output to appear in the Search results panel, just like it would if you were doing an interactive Find All in Current Document.

    It’s a bit of a task because there is no “connection” between PythonScript and writing to the Search results panel, meaning that PS provides no API function call such as notepad.writeToSearchResults(...).

    Maybe the ideas in THIS THREAD give a possible approach…

  • How to multi-select similar worlds ?

    3
    1 Votes
    3 Posts
    345 Views
    N

    This is awesome. Really awesome. So neat feature, I think I will use it very often. Thank you for your help! And thank you to the people who decided to implement this!

  • erase exacly lines

    17
    1 Votes
    17 Posts
    1k Views
    NippurDeLagashN

    @Altevir-Gomes If you feel your English in not good enough, you can still learn Expressões Regulares (Em Portuguese do Brasil)" studying the following book:

    https://www.piazinho.com.br/#download

    The book dedicates a few pages to Notepad++ in chapter 6.

  • 1 Votes
    4 Posts
    430 Views
    CoisesC

    @David-Kerber

    Columns++ (which Alan mentioned) is not yet available through the Plugins Admin in Notepad++, but you can find the latest release here. If you have Notepad++ installed in the default location, you can use the “Quick Installer” link in that release description — just download it and run it.

    The function you want is described here in the help. You can check that out first to see if seems like it will work for you.

  • Setting a file tab's Language to "Internal Search"

    4
    2 Votes
    4 Posts
    432 Views
    Alan KilbornA

    There is further discussion about this topic in this thread: https://community.notepad-plus-plus.org/topic/25145/find-and-display-all-duplicate-lines/

  • Redefine Shortcuts

    3
    1 Votes
    3 Posts
    215 Views
    Kannan GK

    @Terry-R
    Was not knowing that, worked like a Charm! GREAT! Thanks a LOT!!

  • Making font size a shortcut

    3
    1 Votes
    3 Posts
    452 Views
    Alan KilbornA

    @Owlyvia-Tirsek said in Making font size a shortcut:

    can I make a shortcut for changing text size?

    Maybe you want to consider zoom-in and zoom-out, for (temporary) text size change needs?

    Hold the Ctrl key down and scroll the mouse wheel in both directions while pointing at your editor text, to see the effect.

  • nppFTP is ignoring cachemap

    3
    1 Votes
    3 Posts
    198 Views
    Paul SmartP

    NP++ version 8.5.8
    NppFTP version 0.29.12 (unicode)

    Just set this up on a new machine, so this should all be pretty up to date.

  • Setting to close Find window after initiating search?

    10
    0 Votes
    10 Posts
    719 Views
    Alan KilbornA

    The desired behavior can be scripted if one wants to use a plugin (PythonScript) to achieve the goal.

    I call the script FindNextClosesFindWindow.py and here is its listing:

    # -*- coding: utf-8 -*- from __future__ import print_function # see https://community.notepad-plus-plus.org/topic/19844/setting-to-close-find-window-after-initiating-search from Npp import * import platform from ctypes import (WinDLL, WINFUNCTYPE) from ctypes.wintypes import (HWND, UINT, INT, WPARAM, LPARAM) #------------------------------------------------------------------------------- user32 = WinDLL('user32') GWL_WNDPROC = -4 # used to set a new address for the window procedure LRESULT = LPARAM WndProcType = WINFUNCTYPE( LRESULT, # return type HWND, UINT, WPARAM, LPARAM # function arguments ) running_32bit = platform.architecture()[0] == '32bit' SetWindowLong = user32.SetWindowLongW if running_32bit else user32.SetWindowLongPtrW SetWindowLong.restype = WndProcType SetWindowLong.argtypes = [ HWND, INT, WndProcType ] SendMessageW = user32.SendMessageW SendMessageW.restype = LRESULT SendMessageW.argtypes = [ HWND, UINT, WPARAM, LPARAM ] WM_COMMAND = 0x111 WM_CLOSE = 0x10 IDOK = 1 # 'Find Next' button in Find dialog # for the following see https://github.com/notepad-plus-plus/notepad-plus-plus/blob/3c9d58176b0fd890d26e96d0208d2d981f1544e4/PowerEditor/src/ScitillaComponent/FindReplaceDlg_rc.h#L1 IDC_FINDNEXT = 1723 # 'Find down-arrow' button in Find dialog IDC_FINDPREV = 1721 # 'Find up-arrow' button in Find dialog #------------------------------------------------------------------------------- class FNCFW(object): def __init__(self): for try_count in (1, 2): if try_count == 2: notepad.menuCommand(MENUCOMMAND.SEARCH_FIND) for find_window_tab_caption in [ u'Find', u'Replace', u'Find in Files', u'Find in Projects', u'Mark' ]: self.find_window_hwnd = user32.FindWindowExW(None, None, u'#32770', find_window_tab_caption) if self.find_window_hwnd: self.new_find_wnd_proc_hook_for_SetWindowLong = WndProcType(self.new_find_wnd_proc_hook) self.orig_find_wnd_proc = SetWindowLong(self.find_window_hwnd, GWL_WNDPROC, self.new_find_wnd_proc_hook_for_SetWindowLong) if try_count == 2: self.close_find_window() return def new_find_wnd_proc_hook(self, hwnd, msg, wParam, lParam): orig_wnd_proc_ret_val = self.orig_find_wnd_proc(hwnd, msg, wParam, lParam) if msg == WM_COMMAND and wParam in [ IDC_FINDNEXT, IDC_FINDPREV, IDOK ]: self.close_find_window() return orig_wnd_proc_ret_val def close_find_window(self): SendMessageW(self.find_window_hwnd, WM_CLOSE, 0, 0) #------------------------------------------------------------------------------- if __name__ == '__main__': try: fncfw except NameError: fncfw = FNCFW()

    It can be set up in startup.py to run automatically when Notepad++ starts via these two lines:

    import FindNextClosesFindWindow fncfw = FindNextClosesFindWindow.FNCFW()
  • Replacing new line sign ("\n") when the line after starts with ";"

    7
    1 Votes
    7 Posts
    30k Views
    P

    @PeterJones it is absolutely it, it works perfectly! Thank you so much!

    I’m a little bit embarrassed that I haven’t connected the dots…

    Thanks once again!

  • Hide specific section in menu bar like macro, run

    3
    1 Votes
    3 Posts
    282 Views
    Alan KilbornA

    @Alex01921

    Why do you want to hide those menus?
    Do you have users and you don’t want them creating macros or Run menu entries?
    Maybe this is a feature request for Notepad++? If so, see HERE.

    You could probably achieve this via a script, but as I have little interest myself I can’t provide further help on it.

  • Create HTML table every second line

    2
    1 Votes
    2 Posts
    217 Views
    Alan KilbornA

    @Gaurang-Amin said in Create HTML table every second line:

    <tr><td>Anti-Allergy</td><td>Yes</td></tr>

    Try:

    Find: (?-s)^(.+)\R(.+)
    Replace: <tr><td>${1}</td><td>${2}</td></tr>
    Search mode: Regular expression

    Learn more about regular expressions HERE so that you don’t have to ask next time.

  • Problems when switching back into Notepad++ to make it the Active window

    7
    2 Votes
    7 Posts
    638 Views
    Alan KilbornA

    @mkupper said in Problems when switching back into Notepad++ to make it the Active window:

    If you already have one or more active selections then you can hold the Ctrl key down when you click to activate Notepad++. It’ll keep your selection(s) active

    In my experimentation after reading this, Ctrl+click to activate gives me an additional caret at the click point, along with keeping the other selection I made.

    I suppose that isn’t harmful if I’m intending to just copy the selection I previously had.

    But I’d have to remember to Ctrl+click to activate Notepad++, and I probably won’t remember that.

  • copying LTR text in RTL mode

    7
    3 Votes
    7 Posts
    475 Views
  • Find and replace 3rd occurrence of symbol (changing CSV)

    3
    1 Votes
    3 Posts
    291 Views
    Robert BarbaR

    thank you, and I didn’t realize it was the 4th… lol!
    here are 5 examples all of various lengths.

    D:America:US:CA:Springfield:92584
    D:America:US:OR:Salem:97301
    D:America:US:NH:Portsmouth:03801
    D:America:US:NJ:Little Egg Harbor:08087
    D:America:US:IL:Oak Brook:60523

  • Better Function List for Java ?

    23
    1 Votes
    23 Posts
    2k Views
    PeterJonesP

    @rdipardo said in Better Function List for Java ?:

    let me try to explain why this grossly overstates Lexilla’s capabilities.

    Somewhat optimistic, possibly. But I don’t think it’s grossly overstated.

    A lexer is in fact surprisingly like a regex engine.

    And as such, it should be able to do at least as well as the regex-based approach, with the added benefit that it’s much easier to track state inside the non-extensible C++ code, so being able to track whether or not a function definition is still within a given class or not would be possible to add – though it may be a lot of effort.

    But I don’t think that anyone should bother with such a feature request to Lexilla, because I am quite confident that, no matter whether my feasibility estimation is just optimistic or “grossly overstated”, they would reject it out of hand.

  • XML Tools - Validation against a Schema

    2
    1 Votes
    2 Posts
    237 Views
    Mark OlsonM

    @PatG1958
    I can’t help you with this error, but if nobody here can help, you might want to go to the GitHub repo and raise an issue, so that maybe the maintainer or somebody else can help.