Run selected line in notepad++ console

2019-08-14 00:18发布


This might seem a bit too obvious but I am stuck with it anyway.
I am editing an ffmpeg code in notepad++ and I want to run the selected line of code directly in notepad++ console (nppexec plugin console).
say, I have four lines of code, and I want to run only the second line (selected line):

enter image description here

currently, I am coping the line and pasting it in the console and hitting enter. I know it is very noobie!
Please help to achieve this with a shortcut or something.

1条回答
男人必须洒脱
2楼-- · 2019-08-14 00:48

Once I created a small nppexex script, to run an external command on the selection, based on that you can use a nppexec script like:

sel_saveto c:\Temp\NPP_Selection.bat
cmd /c c:\Temp\NPP_Selection.bat

Please save your file with the ffmpeg command with ansi encoding (with UTF8 there was an error with some strange characters at the start of the selection).

The script stores the selection in a bat file and then runs it with cmd /c

查看更多
登录 后发表回答