对一般应用,将程序编译器或脚本解释器程序所在路径放在path里,然后将程序编译器或脚本解释器程序名放在atom-build.yml里,按F9运行。前提,atom 上安装好 build 插件。
cmd: "cbrother"
name: "/{FILE_ACTIVE_NAME_BASE}"
args:
- /{FILE_ACTIVE}
# - <argument2>
sh: true,
cwd: /{FILE_ACTIVE_PATH}
env:
# VARIABLE1: "VALUE1"
# VARIABLE2: "VALUE2"
errorMatch:
# - ^regexp1$
# - ^regexp2$
warningMatch:
# - ^regexp1$
# - ^regexp2$
#keymap: <ctrl-alt-k>
#atomCommandName: namespace:command
#targets:
# extraTargetName:
# cmd: "<command to execute>"
# args:
# (any previous options are viable here except `targets` itself)
对g++编译后运行的,将程序编译器或脚本解释器程序所在路径放在path里,然后将程序编译器或脚本解释器程序名放在atom-build.yml里,按F9运行。前提,atom 上安装好 build 插件。
cmd: "g++"
name: "Compile and run g++ single program"
args:
- "{FILE_ACTIVE}"
- "-o {FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE} &&"
- "{FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE}"
sh: true,
cwd: /{FILE_ACTIVE_PATH}
env:
# VARIABLE1: "VALUE1"
# VARIABLE2: "VALUE2"
errorMatch:
- (?<file>[0-9a-zA-Z_]+\\.+[cC]):(?<line>\\d+):\\s+(?<message>.+)
# - ^regexp2$
warningMatch:
# - ^regexp1$
# - ^regexp2$
#keymap: <ctrl-alt-k>
atomCommandName: "Run application in terminal"
targets:
extraTargetName:
cmd: "./{FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE}"
# args:
# # (any previous options are viable here except `targets` itself)