不多说其他的
python
sublime上自带的buid system
比较有限,我们额外创建几个即可
{
"cmd": ["python3","$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.py",
"encoding": "GBK",
"variants": [{
"name": "Run",
"shell": true,
"cmd": ["gnome-terminal --window -x bash -c 'python3 ${file_base_name}.py;exec bash'"],
"working_dir": "${file_path}",
"encoding": "UTF-8"
//GBK 可能会乱码
}]
}
java
{
"cmd": ["javac","$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.py",
"encoding": "GBK",
"variants": [{
"name": "Run",
"shell": true,
"cmd": ["gnome-terminal --window -x bash -c 'javac ${file_base_name}.java;exec bash'"],
"working_dir": "${file_path}",
"encoding": "GBK"
//GBK可能乱码,使用UTF-8时javac需要额外参数
}]
}