1、使用python3为解释器进行匹配置
{
//"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}\"",
}
]
}
------------------------------------------------------------------
python REPL运行为python3,怎么修改?
1、打开ST3,点击Preference选项卡,打开插件目录;
2、在弹出窗口中选择目录:SublimeREPL -> config -> Python
3、选中目录下的“Main.sublime-menu”文件,用编辑器打开。如图,将第22行的“python”替换为本机电脑Python3解释器的路径。其他的同等位置也做如此修改。保存后关闭。
---------------------------------------------------------------------------------------------
sublime代码补全代码补全问题:
1、vim .codeintel/config.log
2、里边放入如下代码:
{
"PHP": {
"php": 'D:/phphuanjing/php',
"phpExtraPaths": ['D:/phphuanjing/php/ext'],
"phpConfigFile": 'D:/phphuanjing/php/php.ini'
},
"JavaScript": {
"javascriptExtraPaths": []
},
"Perl": {
"perl": "/usr/bin/perl",
"perlExtraPaths": []
},
"Ruby": {
"ruby": "/usr/bin/ruby",
"rubyExtraPaths": []
},
"Python": {
"python": '/usr/bin/python',
"pythonExtraPaths": []
},
"Python3": {
"python": '/usr/bin/python3',
"pythonExtraPaths": []
}
}
3、重新启动sublime: subl
------------------------------------------------------------------
sublimeT解决中文输入问题:
1、
git clone https://github.com/lyfeyaj/sublime-text-imfix.git
2、
cd sublime-text-imfix
3、
sudo ./sublime-imfix
4、
Done!
Thanks for using this script to fix CJK Input Method problem of SublimeText 2/3.
Re-login your X windows and start to use SublimeText 2/3 with Fcitx!
然后再subl打开sublime即可输入中文!