Sublime-Text-3 Windows编译选项
C++
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"shell": true,
"variants":[{
"name": "Run",
"cmd": [ "g++", "${file}", "-o", "${file_path}/${file_base_name}", "&start", "cmd", "/c", "${file_path}/${file_base_name}.exe &echo. &pause"]
}]
}
Java
{
"cmd": ["javac", "-encoding", "UTF-8", "-d", ".", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"working_dir": "${file_path}",
"shell": true,
"variants": [{
"name": "Run",
"cmd": ["javac", "-encoding", "UTF-8", "-d", ".", "$file", "&start", "cmd", "/c", "java ${file_base_name} &echo. &pause"]
}]
}
Python
{
"cmd": ["start", "cmd", "/c", "python $file &echo. &pause"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"working_dir": "${file_path}",
"shell": true
}
Sublime-Text-3 Ubuntu编译选项
C++
{
"shell_cmd": "g++7 \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"variants": [{
"name": "Run",
"shell_cmd": "g++7 \"${file}\" -o \"${file_path}/${file_base_name}\" && gnome-terminal -x bash -c \"${file_path}/${file_base_name};echo;echo 按任意键继续...;read -n 1\""
}]
}
Java
{
"shell_cmd": "javac -encoding UTF-8 -d . $file",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"variants": [{
"name": "Run",
"shell_cmd": "javac -encoding UTF-8 -d . $file && gnome-terminal -x bash -c \"java ${file_base_name};echo;echo 按任意键继续...;read -n 1\""
}]
}
Python
{
"shell_cmd": "gnome-terminal -x bash -c \"python3 $file;echo;echo 按任意键继续...;read -n 1\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}"
}
Sublime-Text-3插件选项
快捷键设置
[
{ "keys": ["ctrl+r"], "command": "reindent" , "args":{"single_line": false}},
{ "keys": ["alt+m"], "command": "markdown_preview", "args": { "target": "browser"} },
{ "keys": ["alt+c"], "command": "convert_to_utf8", "args": {"encoding": "UTF8", "stamp": "0" } },
{ "keys": ["ctrl+alt+c"], "command": "convert_to_utf8", "args": {"encoding": "GBK", "stamp": "0" } },
{ "keys": ["alt+j"], "command": "pretty_json" },
{ "keys": ["ctrl+alt+j"], "command": "un_pretty_json" }
]
Markdown Preview
{
"enable_highlight": true,
"enable_mathjax": true,
"html_template": "D:\\我的文档\\文档\\Ice\\学习\\Blog\\base.html"
}
Anaconda
{
"anaconda_linting": false
}
Ubuntu16.04下Sublime Text 3无法输入中文
首先参考Github上的解决方案
sublime-text-imfix
为了使用鼠标右键打开文件时能够使用中文输入,还需要修改文件sublime_text.desktop的内容
将[Desktop Entry]中的字符串
Exec=/opt/sublime_text/sublime_text %F
修改为
Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text %F"
将[Desktop Action Window]中的字符串
Exec=/opt/sublime_text/sublime_text -n
修改为
Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text -n"
将[Desktop Action Document]中的字符串
Exec=/opt/sublime_text/sublime_text --command new_file
修改为
Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text --command new_file"