formulahendry / formulahendry/vscode-code-runner

[Feature request] 自定义命令支持定义多个命令定义

Open
#658 0 comments 2 reactions 0 assignees View on GitHub
feature request
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

code runner 支持自定义多个指令,然后按快捷键或者右键得时候时候可以直接打开这些自定义得快捷键,
如果只定了一个,这快捷键直接运行这个命令,如果定义了多个,可以供给用户选择.
- 大概如图,

![image](https://user-images.githubusercontent.com/1876302/90033537-2b9b0f00-dcf2-11ea-931d-3bc97a6874e9.png)
另外,这里建议再名字后面增加具体命令得显示,(过长得命令则直接压缩显示,有助于用户知道当前得命令是什么.不然有时候只看到pushg是不知道什么意思得)
就像这个命令,可以看到命令得中文名,还有命令得名字,甚至还有快捷键.
![image](https://user-images.githubusercontent.com/1876302/90035116-04454180-dcf4-11ea-8194-c223a8c2ada4.png)

- 配置
```json
"code-runner.customCommand": {
"pushg": "git push $(git config branch.$(git rev-parse --abbrev-ref HEAD).remote) HEAD:refs/for/$(git config branch.$(git rev-parse --abbrev-ref HEAD).merge)",
"echo": "echo ${file}"
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.