2016.9.8更新:linux
linux(Ubuntu16.04)下的配置,编译后用终端运行,解决了不能输入的问题c++
{ "encoding": "utf-8", "working_dir": "$file_path", "shell_cmd": "g++ \"$file_name\" -o \"$file_base_name\"", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c++", "variants": [ { "name": "Run", "shell_cmd": "g++ '$file' -o '$file_base_name' && gnome-terminal -x bash -c \"'${file_path}/${file_base_name}';read -p '\nPress any key to continue...'\"" } ] }
————————shell
由于喜欢Sublime Text 3 的高亮配色,因而想在这里写程序。从emacs配置时连配置文件在哪都不知道到vim配置了半天颇有成就感,我对配置文件算是更了解了。不过Sublime Text 3 没那么麻烦。配置C++编译运行的方法大概就是配置一个Build System。在cmd窗口运行且解决了中文乱码问题的c++编译配置以下:vim
{ "encoding": "utf-8", "working_dir": "$file_path", "shell_cmd": "g++ -Wall -std=c++11 -fexec-charset=GBK \"$file_name\" -o \"$file_base_name\"", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c++", "variants": [ { "name": "Run", "shell_cmd": "g++ -Wall -std=c++11 -fexec-charset=GBK \"$file\" -o \"$file_base_name\" && start cmd /c \"\"${file_path}/${file_base_name}\" & pause\"" } ] }