Notepad++ using "Run" command in a macro - macros

Is it possible to create a macro in Notepad++ that is able to utilize the "Run" command so that I may call an external .exe to operate on the file specified? I am able to do it manually, but when I create a macro that includes the run (F5) and give it a specified command it fails to execute. Is this because the run command isn't supported when creating macros? If so, is there a work-around method?
Thanks
edit: to add context -- I've written a couple ruby scripts to facilitate data-entry that's done using notepad++, and would like to integrate them to the editor. Having them run by a shortcut method created by recording a macro seems to be the best way to do this, unless it's not possible to utilize the run command.

FWIW The Zeus and Zeus Lite editors can do this.

You can do it with the NppExec plugin (available in the Notepad++ wiki ). It allows you to create mini-scripts with keywords that perform commands.
You will also be able to add your script in the contextual (right-click) menu, or assign a shortcut to it.
I personaly uses it to saves a sql file, place myself in the current directory, and then executes isql.exe (external executable) on that file. That simple script transforms my Notepad++ into a rather handy SQL IDE.

I don't think you do it using only Notepad++.
Please see this thread:
http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4805532

If I understood you correctly, you have it all set up but are having issues with running it through Notepad++'s run command?
If so, try what I mentioned here.
I had similar issues with running php compiler and resolved it with the "cmd /c" added like in that mentioned example. And a "& pause" at the end, just so I see what goes on.

Related

VSCode - Automatically pick debugger

I have an Ansible workspace where I'm writing YML, PowerShell, and Python. Because of how things are set up where I work, I can't directly debug the YML files, so I need a custom launch configuration to run the files the way they are needed.
I'd love to just assign this to only YML extensions and leave the default debugger for Python and PowerShell files, as I switch between them quite often.
My current setup has a debug.ps1 file that will automatically switch between what it should launch based on the file that was debugged, but the Python files launch without the help of the Python debugger. I'd love for some way to either make that script launch the Python debugger, or make some sort of pre-debug task that tells VSCode what debugger to use.
Is there any way to do this?
Thanks!

Add completion information for existing CLI utility?

For example, I would like to add completion to adb so that when I hit Tab after adb I can see sub-commands like shell and install. In Bash or Zsh the completion is always in separate file, so this is not an issue. How do I do similar thing in PowerShell (if ever possible)?
Use TabExpansion++.
There is precedent for using a script to generate completers for native commands (see here).
(The comment about PowerShell using Intellisense is incorrect.)

How can I run vim from PowerShell just by typing vim?

I just installed vim. It's awesome. From PowerShell, I want to be able to launch it both via typing vim and by typing vim someFile.txt.
I can already open vim through the run dialog. Further, it's already in my system PATH. What must I do to launch it from PowerShell?
If it's already in the path, it should work.
But you can, alternatively, use an alias via New-Alias. If you add that to your profile, it will load every time.
To see how the run box behaves differently from powershell, and how you might get around that, see my answer here:
Run a program by name from PowerShell (similarly to the run box)

eclipse plugin: run command in console, get stdin

I'm making an eclipse plugin where I want to run a system command, and have the output of the command go to the eclipse console. I know how to do this via http://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_from_a_plug-in%3F
The problem I don't know how to solve, is to allow interactive input from the console for this command.
In essence, I want to kick off a command which runs in the console. The user can interact with this command (via stdin). I then want my plugin code to get a callback when the command has finished (or user has manually stopped/terminated the command in the console). Getting the return code of the completed program would be nice as well.
For simplicity sake, lets use the unix 'passwd' command as the example (this is the first common cmd I could think of that both has output and prompts for input). I don't need to hide the stdin however.
For reference, the command I'm trying to call is the CakePHP bake shell.
I assume that you got yourself a MessageConsole, like in the FAQ. Then it should be possible to use messageConsole.getInputStream().read() in a loop to get your input (but I have not tested this). See also the documentation of the IOConsoleInputStream for more options.
On the other hand I'm not sure why you are creating your own plugin to do that. The standard console implementation in Eclipse does exactly what you want. You can see that by running a small Java application, where you can use that console for input and output as well.

eclipse sh edit and run

What would be the best way to run and edit a .sh script within Eclipse?
Regarding the editing part, I've found the ShellEd plugin, but it seems very minimalistic, is there no alternative?
Regarding the running part, I've found that there's a built in console that can be accessed by right clicking the .sh, then clicking 'remote system view', then clicking 'local'. But it's very minimalistic, there is not even tab completion. I would like something that could be as close to Bash as possible.
You may find these two hyperlinks to be useful:
http://www.linuxforums.org/forum/applications/132034-running-shellscripts-eclipse.html
Bash script plugin for Eclipse?
I do not know much about Eclipse. I prefer Geany; however, it does not execute shell scripts.