for eg : if I want to install npm package through keyboard shortcut in sublime text by selecting the text then every time the argument will be the one that I selected(using mouse/keyboard) before using keyboard shortcut to trigger.
Asked
Active
Viewed 884 times
1
-
You'll need to write a [plugin](http://www.sublimetext.com/docs/3/api_reference.html) for this. – MattDMo May 07 '14 at 14:06
1 Answers
3
You could use the sublime-text-shell-command plugin. According to the documentation, the following should do exactly what you want:
[
{
"keys": ["ctrl+enter"],
"command": "shell_command",
"args": {
"command": "npm install",
"region": "arg"
}
}
]

OlivierBlanvillain
- 7,701
- 4
- 32
- 51
-
The previous question to that already had a valid plugin that works. http://stackoverflow.com/questions/16618240/how-to-pass-paramaters-to-a-build-in-sublime-text-3 – m3nda Nov 23 '16 at 02:57