学习笔记
仅供学习使用
ubuntu安装sublime text3
- 下载sublime text3
- 下载好之后进行解压
- 打开解压后的文件sublime_text_3_build_3211_x64/sublime_text_3/sublime_text即可运行
sublime text 3中运行cmd命令和参数
-
使用快捷键ctrl + shift + p,打开命令面板,输入install,在菜单中选择Package Control:Install Package如图,按下回车键
-
步骤1后,在命令输入框中输入: Shell Turtlestein,弹出菜单中选择【Shell Turtlestein】
-
点击菜单栏【preferences】->【shell turlestein】,如图说明安装成功
-
按下快捷键ctrl+ shift +c,弹出如图所示的命令行窗口
-
输入命令参数,如图所示,按下回车键
-
命令执行结果如图所示
编写python3.sublime-build
打开sublime text3选择Tools再选择Build System然后选择New Build System…
输入
{
//"shell_cmd": "python -u \"$file\"",
"shell_cmd": "python3 -u \"$file\"", //指定python3为.py默认编译器
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}
保存至默认路径即可
然后在Build System中选择刚编写好的python3按下ctrl+B进行编译