I have command-line tools that sometimes need to bring up a file in an external editor to let me edit it. These tools rely on the blocking behavior of editors: once the editor program exits, they expect the file to have been modified and saved.
However, that's not how Notepad++ seems to work. When you launch Notepad++ from the command line, its command-line invocation immediately returns, even though the Notepad++ GUI just launched. This contrasts with, say, Notepad, for which the command-line invocation returns only when the window is closed.
Is there a way to block the Notepad++ command-line invocation until I close the file it opened?
You can do this using the following steps. Place your cursor at the beginning position where you want to begin selecting text. Press and hold the “Shift” and “Alt” keys on your keyboard. Continue holding “Shift” and “Alt” while using the “Down” and “Right” arrow keys on your keyboard to select the text as desired.
Marking a Block of TextPut your cursor at the top-left corner of the block. Press Alt+Shift and the arrow keys to drag over the block. (Don't release either mode key as you drag.) You will mark a block.
The menu bar will no longer be accessible through Alt-key accelerators, so the Notepad++ menu system cannot be used to get out of this mode; however, there is a little + sign in a box ( ⊞ ) in the upper right which can be used to exit the full-screen mode; alternatively, use the current keyboard shortcut for this ...
Since it's been determined that the tool waits until the program exits, creating a new NP++ instance does the trick. Since this is just for a quick edit, I found it useful to also tell NP++ to ignore any previous session and to hide the tab bar.
set EDITOR="path\to\notepad++.exe" -multiInst -nosession -notabbar
I found the list of options here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With