How do I pass an NppExec argument to Notepad ++?

I am new to Notepad ++. Can someone tell me how to pass the argument when I execute NppExec in Notepad ++? For example, I want to run print @ARGV

through Notepad ++. What parameter should I use so that I can enter my argument when I press F6? I know "$(FULL_CURRENT_PATH)"

. But it doesn't seem to work for passing an argument. Thank!

+3


source to share


1 answer


Here is one way to execute Perl scripts with input arguments for the script using the NppExec plugin in Notepad ++. This will give a window telling you to enter arguments to navigate to the script.

You can leave the "echo" line, which means you can see what the script entry is.

Change the current settings under "NppExec → Execute ..." to:



inputbox "Script arguments : "
echo Script input arguments, @ARGV : $(INPUT)
perl "$(FULL_CURRENT_PATH)" $(INPUT)

      

Hope it helps.

+5


source







All Articles