• disable highlighting of code blocks

    8
    1 Votes
    8 Posts
    2k Views
    MattexDM

    @Lycan-Thrope I know but I use it momentarily to simulate a written exam I have to take

  • An application suddenly stopped processing a Notepad++ text file

    9
    1 Votes
    9 Posts
    994 Views
    Alan KilbornA

    @mkupper said in An application suddenly stopped processing a Notepad++ text file:

    I accidentally pressed some combination of buttons that converted one of the spaces into some kind of special space - longer than usual. I don’t know what exactly that was, but it was quite invisible between the lines, and I only discovered it by moving the cursor up by hand.

    It’s a pity you don’t have more exact information about this, because I’m fairly certain you can’t get a “special space” in this way (although @Coises recently pointed out some non-English keyboard where a special keycombo involving the spacebar inserts a “special space” – so maybe that’s it? – see HERE).

    Notepad++'s default settings, shown here:

    5bf0ce67-de69-423e-944b-dcd843311242-image.png

    should show you if you get any kind of “special character” inserted into your document. The effect would be very obvious, e.g. see ZWNJ character in the sample below:

    0f1f6410-f8fa-4db7-b4b3-05d55bf35655-image.png

    Notepad++ needs to have some warning system for these types of very casual replacements. I probably held down Shift or Control or Alt, and voila. Maybe a beep?

    I think the visual effect is enough. There shouldn’t be any other sort of “casual replacement” – if you think there is, please provide further detail.

  • Help finding search results panel

    5
    1 Votes
    5 Posts
    427 Views
  • Multi-edit

    8
    1 Votes
    8 Posts
    3k Views
    PeterJonesP

    @Alan-Kilborn said in Multi-edit:

    No one would actually use these commands from the menus.

    I cannot remember any more keystrokes, so I’m not likely to assign a keyboard shortcut. Instead, if I find myself wanting to use the new features, I’ll probably add them to the contextMenu.xml, so they’re just a local right-click away.

    … But yes, if I do end up using them often, it will need to be easier access than having to move my mouse cursor up to the main menu system.

  • how to change first letter after colon uppercase?

    2
    1 Votes
    2 Posts
    197 Views
    guy038G

    Hello, @glo and All,

    Not difficult with regular expressions !

    SEARCH (?<=:)\w

    REPLACE \u$0

    Radio button Regular expression set

    Click on the Replace All button

    Best Regards,

    guy038

  • How to copy all phone numbers with a specific format

    3
    1 Votes
    3 Posts
    297 Views
    Marcos MiguelM

    @Coises THANK YOU SO MUCH!

  • Help with regex: bug?

    4
    0 Votes
    4 Posts
    290 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
    635 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
    481 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
    446 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
    3k 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
    570 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
    659 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
    258 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
    738 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
    237 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
    860 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
    42k 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
    553 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
    339 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.