Terminal Plugin
-
Hi community, could you please let me know if any plugin is currently under developement which emulates cmd.exe or even power shell ? I am currently using nppexec which is very good otherwise, but lacks some features as it’s not an emulator. Seemingly Sublime has got one called Terminus. Can we not get any fully functional terminal for our beloved npp ?
-
@Debajyoti-Datta said in Terminal Plugin:
lacks some features
fully functional terminal
Vague. What are you looking for?
Are you literally just looking for a cmd.exe window embedded within a Notepad++ -owned panel? I suppose I understand the desire, although to me, without additional functionality it doesn’t seem like a big win to have that.
-
@Alan-Kilborn nppexec is not a real console emulator is what I meant to say here. As for example, when I open ipython in nppexec it does not follow indentation, let alone keyword colouring. Why do you think having only a editor coloured themed cmd.exe is not a win ? VScode terminal does similar job I believe. What exactly qualifies to you as a win given that it’s just a hypothetical small plugin ?
-
@Debajyoti-Datta said in Terminal Plugin:
nppexec is not a real console emulator is what I meant to say here
Does NppExec plugin claim to be what you think of as a “real console emulator”?
If it doesn’t make that claim, it feels like you are “picking on it”.
Note, I have no great love for NppExec.Why do you think having only a editor coloured themed cmd.exe is not a win ?
Ooh, look at the pretty colors…wow.
What exactly qualifies to you as a win
You’re the one inquiring about it, it isn’t up to me to come up with useful features for it.
But… one thing that immediately pops to mind is that if the cwd of such a panel dynamically followed the directory of the active N++ tab, that could be useful. I checked out VSCode’s terminal and it doesn’t appear to be able to do that (could be wrong, it has endless “settings”).it’s just a hypothetical small plugin ?
I look forward to checking out the plugin you are writing to achieve it.
-
@Debajyoti-Datta said in Terminal Plugin:
could you please let me know if any plugin is currently under developement which emulates cmd.exe or even power shell ?
Yes, both, and WSL:
https://github.com/vinsworldcom/nppConsole
It was abandoned, so I forked, made 64-bit compatible and added some features. I’m sure there are bugs so feel free to report them, but don’t expect any updates without a pull request to fix them.
Cheers.
-
@Alan-Kilborn I apologise if I sounded rude in my previous comment. If I were that smart to write that plugin myself, I would not have asked community. 😄
Nppexec does not claim it is a real console, rather it claims it’s not . It’s a very good workaround though.
One of the major benefits of having integrated terminal is user doesn’t need to leave editor for running programs. I think just having a embedded cmd.exe would make npp much more convenient to use. I hope many people would appreciate that. I might not be very wrong if I assume that integrated terminal has contributed to VScode’s success, even if the contribution is small.
-
@Michael-Vincent I tried it actually, latest release from github. Double click in console window opened cmd in 1/5 tries. Also the UI does not look very coherent. I mean it looks something put forcefully. Not sure if I am able to make you understand.
-
@Debajyoti-Datta said in Terminal Plugin:
@Michael-Vincent I tried it actually, latest release from github. Double click in console window opened cmd in 1/5 tries. Also the UI does not look very coherent. I mean it looks something put forcefully. Not sure if I am able to make you understand.
Could you show a screenshot of your Plugins > NppConsole > Settings (or Plugins > NppConsole > About for an older copy)? That will tell us which version (and whether or not you have the one edited by @Michael-Vincent). For example, here’s mine, showing that I have v1.2.5.1:
To get the cmd window to show, you just have to use Plugins > NppConsole > NppConsole Show – there is no double-clicking involved to get the cmd window to show.
The Settings/About dialog does say you can “Double click in console window, will activate the named document.” – That is supposed to indicate that if you double-click on a filename that’s printed in the NppConsole (like in an error message from a compiler), that it will activate that file in the Notepad++ editor portion. But if (like me), you have your
cmd.exe
set up to allow QuickEdit mode, then trying to double-click will only highlight the filename for copy/paste, rather than activating that file in Notepad++. To check that setting, if you are using cmd.exe in NppConsole, then you can click in the NppConsole and use the keyboard shortcutAlt+Spacebar
, then select Properties and go to the Options tab. That will have a section on Edit Options, and if QuickEdit Mode has a checkmark, then double-click will highlight the text; if it doesn’t have a checkmark, then NppConsole will look to see if Notepad++ has a file open that matches the double-clicked word – but it has to be an exact match; I had a file open calledTest.txt
, and if I double-clicked ontest.txt
(lowercase T), it would not activate that file, whereas if I double-clicked onTest.txt
(capital T) then it did activate that file in Notepad++. If the file is not already open in Notepad++, then NppConsole cannot ask Notepad++ to activate it.And I’m not sure what “UI does not look very coherent”. What portion of the UI is “not coherent” in your mind? (The only things I can think of in the “UI” of that plugin are the Settings/About box and the toolbar icon – the docking window itself is just a standard docking window, like all other Notepad++ docking windows, and the menu system is built into Notepad++, and the actual cmd.exe portion of the “UI” is exactly identical to a normal windows cmd.exe window.) If you could take a screenshot and use Snipping Tool / Snip & Sketch or mspaint.exe or other image editor to add in highlights/arrows to what you think is “not coherent”, and then paste that screenshot into your reply with an explanation of why it’s “not coherent” in your mind, that might help.
-
@PeterJones After your comment, I experimented again, with the same version as yours. It is working better than last time. I have set ctrl+shift+z keybinding to show console and alt+ enter opens cmd by default. The background colour of the cmd inside however, somehow does not follow what I have in external windows cmd prompt. And a toggle function between editor and nppconsole would have been much better. Right now I have to select with mouse.
Regarding the incoherence, last time when I was checking nppconsole the cmd window had minimize, maximize and close button exactly like windows. That looked ugly to be honest.
-
@Michael-Vincent Not sure how difficult it would be or if others will accept, I can think about following suggestions:
- Single command to show the cmd/wsl/ps whatever is set default. Currently it is show console(keybinding to be set manually) and then alt+enter to open cmd.
- Cmd to follow editor colour.
- Option to set keybinding for togging between console and editor.
-
-
@Debajyoti-Datta said in Terminal Plugin:
@Michael-Vincent Not sure how difficult it would be or if others will accept, I can think about following suggestions:
- Single command to show the cmd/wsl/ps whatever is set default. Currently it is show console(keybinding to be set manually) and then alt+enter to open cmd.
You keep on saying you have to do something separate to open “cmd” after the console is shown. When I Show Console, the cmd.exe starts up by itself.
Ah, okay, if I type
exit
in the cmd.exe, it kills that process, so the next time you show the NppConsole, I had to use Plugins > NppConsole > Restart Console (or, per your keybindings, the equivalent ofAlt+Enter
). If you avoid typingexit
(or doing anything else that kills the cmd.exe process), do you still have the cmd.exe process stop at other times, so that you have to restart it? Because when I just hide then re-show the NppConsole, the active cmd.exe stays active.- Cmd to follow editor colour.
The cmd.exe embedded in that NppConsole panel is controlled (font, color, etc) by Windows, so it uses its Alt+Spacebar menu system for setting those things. It would surprise me if it was customizable by the process (ie, NppConsole plugin) that launches the cmd.exe process.
- Option to set keybinding for togging between console and editor.
That would be nice. You could create an issue for that plugin here so it could be tracked.
But @Michael-Vincent has commented (implied here, said explicitly in other issues) that unless it’s a simple change, it’s not likely to be implemented without a Pull Request to accompany the issue report. -
@Michael-Vincent @PeterJones Below is screenshot of my npp.
-
@PeterJones I have shown screenshot of my notepad++. You can see the Dracula themed external cmd and black coloured nppconsole cmd. This is strange.
When I am closing npp and reppening, show console just opens a black box, then I need to press alt+enter (I have not set this keybinding, it is default).
I do not know much about GitHub protocols, (as I said, I code occasionally, so some developer things might not be obvious to me) but will try to create pull requests.
-
@Debajyoti-Datta said in Terminal Plugin:
@PeterJones I have shown screenshot of my notepad++. You can see the Dracula themed external cmd and black coloured nppconsole cmd. This is strange.
Click in the NppConsole. Hit
Alt+Spacebar
. Set the colors for that console the way you want (Properties will affect just the current instance; Default will affect allcmd.exe
windows)The cmd.exe inside the NppConsole panel just followed Windows saved colors for cmd.exe. (Note that Windows has a few different saved colors, depending on exactly how you run it: if I run it using Win+R > cmd.exe or Notepad++'s Run > Run… dialog then
cmd.exe
, then it uses the same colors that the NppConsole’s cmd.exe uses; if I run cmd.exe using a shortcut on my Windows Taskbar or Desktop, that shortcut can embed the color preferences.)When I am closing npp and reppening, show console just opens a black box, then I need to press alt+enter (I have not set this keybinding, it is default).
When I do the same thing, the cmd.exe just runs automatically. Weird. (Keybinding: I must’ve cleared that keybinding, because I have
alt-enter
bound to something I use much more frequently.) -
Forget Notepad++, just talking Windows Command Prompt now. The
Alt+Enter
keystroke for Windows Command Prompt toggles maximize (full screen) and restore of the window containing Command Prompt.Now, consider NppConsole; when you click to activate the NppConsole plugin dockable window and then use the
Alt+Enter
keystroke, you’re sending that to the Command Prompt to toggle maximize and restore. I have no idea why you would (need to) do that.Please keep in mind the plugin (original) is essentially a hack to embed a Windows console session into the rather restrictive and dated Notepad++ plugin architecture. It will not function as nicely as the embedded terminal in VS Code for example.
Cheers.
-
@Michael-Vincent yes, we should probably end our discussion here.