how to pass dynamic argument in sublime text 3?

孤者浪人 提交于 2019-12-11 11:04:23

问题


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.


回答1:


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"
    }
  }
]


来源:https://stackoverflow.com/questions/23518914/how-to-pass-dynamic-argument-in-sublime-text-3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!