• Making font size a shortcut

    3
    1 Votes
    3 Posts
    885 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
    269 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
    980 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
    50k 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
    622 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
    404 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
    874 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
    617 Views
  • Find and replace 3rd occurrence of symbol (changing CSV)

    3
    1 Votes
    3 Posts
    636 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
    3k 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
    302 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.

  • Scroll through document list with mouse hover

    6
    1 Votes
    6 Posts
    1k Views
    Alan KilbornA

    @mkupper

    asking for is the ability to hover over a file name to activate it

    Hovering to pop up information is fine, but hovering actually changing things IMO is a bad idea (as I tried to discuss in a previous posting). The mouse will always come to rest somewhere when the user is done using it (and goes back to typing text, say). Oftentimes you just want to get the mouse cursor out of the way so you don’t care where it lands. If this happened to activate some tab I don’t care about right now, I’d be an annoyed user.

    Note: I do know that a recent enhancement to Scintilla hides the mouse cursor when typing starts (I was fundamental in getting Scintilla to do that).

  • use notepad-plus-plus to search and replace from a text file

    4
    1 Votes
    4 Posts
    460 Views
    mkupperM

    @notepaddpp1023, it is possible to do what you want in Notepad++ but as others have said, it’s best for you to use the tools/skills you are already comfortable with. Your project description is vague but it sounds complicated. This means you will be figuring out and debugging issues with whatever solution you use. If you take on learning something new, regardless of what it is, then you are also faced with debugging your understanding of whatever new tools or methods you are using.

    Something else to keep in mind is on if this is your own personal project or is it part of a work or school environment? There are solutions that may end up working perfectly well for you personally but may not be portable or usable by others that may not be as familiar with the data as you. Others may have different needs for that data. If you are part of a team and you have bosses and supervisors then those people need to direct the overall process.

  • Same NPP executable run on multiple PC : need their own sessions

    3
    1 Votes
    3 Posts
    271 Views
    mkupperM

    @Gian-Matteo - Try experimenting with Notepad++'s -settingsDir command line option. If you point it at a folder that is not shared with the other computers then it will be in it’s own session.

    Keep in mind that Notepad++ reads its configuration and session files when it starts and writes then back out when you exit or close Notepad++. Thus, you will need to move and think carefully when testing out and using more than one copy of Notepad++ at the same time either on the same or different machines.

    It is likely possible* to do what you want to do but you have not provided enough information about how you are currently set up for others to provide suggestions that may be a better fit for your situation or desires.

    * I had to add an asterisk as there is one issue you may run into which is Notepad++ does not have perfect support for running two or more instances of Notepad++ on the same machine at the same time.

  • RegEx solution to evaluate URL string - keep only the ending

    11
    0 Votes
    11 Posts
    3k Views
    Alan KilbornA

    @JustinJudo said in RegEx solution to evaluate URL string - keep only the ending:

    I had a death of a family member recently…I have far more important things to process in my head than trying to learn…

    Yes, you do.
    I’m sorry for your loss; we all go through these things. :-(

    Perhaps you should be taking a break from everything right now, including your original need for manipulation of URL text data – how important is that in your current state? You’re bound to make mistakes with whatever you’re trying to accomplish.

    As for my comment about PeterJone’s attitude, he deleted his snarky and condescending snipet so it just looks like I’m criticizing him for no reason - but yeah it certainly was there… he deleted it

    I suppose this IS a problem. If something is there long enough for someone to respond based on it, it should not be deleted or changed, lest further respondents draw potentially false conclusions. BUT… having read Peter’s posts here for years and years, I have a hugely hard time believing that anything he said was all that offensive.

    A LATER EDIT: After reading Peter’s restored-but-strikethrough posting parts, assuming they are legitimate (but I’m sure they are), there’s nothing there that should have caused a flap of the magnitude that ensued. Let’s chalk it up to the OP having a bad day (or series of days/weeks when you have a death of someone close) when he wasn’t fully in his right mind.

    Oh, well, let’s get back to Notepad++ business.

  • Need to replace a line feed character in column 86

    4
    1 Votes
    4 Posts
    325 Views
    CoisesC

    @Mark-Boucher said in Need to replace a line feed character in column 86:

    the line feed LF character in column 86 (after MM/YY before *01)

    If the pattern is consistent that you have one or two digits, a diagonal, two digits, a line break, and “*01” at the beginning of the next line, then just select Search | Replace… from the menu, enter:

    Find what : (?<=\d/\d\d)\R(?=\*01)
    Replace with : a single space
    Search Mode: Regular expression

    and use the Replace All button.

    If that gets other sorts of lines that you didn´t want wrapped, then it can be refined, or you can use the counting characters method @Mark-Olson explained.

    @Mark-Boucher said in Need to replace a line feed character in column 86:

    To accomplish this, I have tried using the Begin/End Select in Column Mode

    Rectangular selections won’t work for this, for a couple of reasons. For one thing, you can’t select or change line endings using rectangular selections. In addition, you’re not just selecting the long lines, you’re also selecting “virtual space” past the end of the short lines.

  • Doesn't print correctly (was: No imprime correctamente)

    Moved
    4
    0 Votes
    4 Posts
    370 Views
    PeterJonesP

    Moderator Note: this topic was renamed to its English equivalent (to make searching by topic name easier), and moved from the “Notepad++ & Plugin Development” to “Help Wanted” (because it wasn’t a question about how to contribute to Notepad++ or how to make a plugin)

  • Npp exec wrongly output program

    5
    1 Votes
    5 Posts
    505 Views
    Vitalii DovganV

    I was considering to add a FAQ to the NppExec Manual in 2017, in the times of NppExec v0.6 alpha 1.
    Well, finally, it happened :)

    https://d0vgan.github.io/nppexec/NppExec_Manual/FAQ.html

  • How to show the special characters?

    7
    0 Votes
    7 Posts
    46k Views
    mkupperM

    @sadicus said in How to show the special characters?:

    How to show the special characters?
    I’m not even sure if that’s whats neede, but not understanding what else is causing spaces between words.
    in this case editing a “New Doc Sizes.psp” file.
    When Photoshop reads the psp file, it displays correctly with no space.
    In Text Edit, it displays with several spaces between the words.

    If the goal is to sort the list of settings then sort and save the file (make a backup first). If Photoshop is happy with your sorted file then you are done. The exact nature of the spaces would remain a mystery.

    If you want to know what those spaces are then I think it would help if you were to copy paste the lines for CardRack and MayaShelf into the forum thread as your reply. Put a line with three back ticks before your example lines another line with three back ticks afterwards like this:
    ``` txt
    “Card   Rack”, …
    “Maya   Shelf”, …
    ```

    The problem is that while we can walk you through various ways to show special characters in Notepad++ the results will vary depending on what invisible characters you are dealing with. If you do the three back ticks thing as shown above then hopefully we all will be able to figure out what the invisible characters are and can provide better directions on what settings or features to use if you want those things that look like spaces to be clearer to you when looking at the file in Notepad++.

  • Notepad++ on Macs

    5
    0 Votes
    5 Posts
    2k Views
    mkupperM

    @YukiYasha said in Notepad++ on Macs:

    What prevents us from deploying it on Mac OS?

    Nothing prevents you or anyone from writing an application called Notepad++ for the Mac. Notepad++'s source code is available and is licensed so that you can look at and use it.

    The developer of Notepad++ for Windows has chosen to focus their entire attention on Windows and has tuned Notepad++ to work well within Windows.

    Internally, Macs and Windows are very different.

    Someone who wants to use the Notepad++'s source code to create a Mac version will be faced with that 100% of the code and data structures is tuned for Windows. Let’s start with something that seems basic and simple, which is the keyboard. Macs and Windows machines do not have the same set of keys. They also use very different data structures and key codes. Windows was designed to work well with IBM PC style keyboards. 40 years later Windows and applications such as Notepad++ are still very much oriented around how IBM PC style keyboards work.

    If you are writing a Notepad++ for the Mac do you spend time figuring out how to map what you get from a Mac’s keyboard into Windows style keyboard events, data structures, and scan codes or do you want your text editor for the Mac to be efficient and to use Mac style logic within your editor? These decisions will happen over and over for every single aspect of Notepad++'s Windows centric code.

    Rather than attempting to rework Notepad++'s code to be native for the Macintosh it is much easier to Google for Notepad++ for the Mac. There are over eight million hits. It looks like TextWrangler used to be a popular text editor for the Mac. Apple broke TextWrangler with an update to MacOS. The developers of another text editor for the Mac, BBEdit, added some TextWrangler features.