Sublime Text 3 配置教程(C++)

1.下载Sublime Text 3并安装

官网链接

2.激活

若果购买了序列号,就直接激活。没有买的话上网找一下序列号(一定要改Hosts!)

3.最基本的配置

1)中文设置

https://jingyan.baidu.com/article/9c69d48fea00ca13c9024e18.html

2)编译器安装

首先安装g++,并添加到环境变量

https://www.jianshu.com/p/ff24a81f3637

3)编译设置

工具->编译系统->新建编译系统

把这段代码粘进去

 1 {
 2     "cmd":"g++ -std=c++11 $file_name -o $file_base_name",  
 3     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
 4     "working_dir": "${file_path}",
 5     "encoding":"cp936",
 6     "selector": "source.c, source.c++",
 7     "variants":
 8     [
 9         {
10         "name": "Run",
11          "shell_cmd": "g++ -Wall -std=c++11 \"$file\" -o \"$file_base_name\" && start cmd /c \"${file_path}/${file_base_name} & pause\""
12         }
13     ]
14 }

保存后选择为默认。

之后用cltr+b可以编译

4.美化

https://www.zhihu.com/question/46266742/answer/137255546

推荐用第一个。

配置文件:

(首选项->Packege settings->Boxy theme->Preference)

 1 {
 2     "always_show_minimap_viewport": true,
 3     "bold_folder_labels": true,
 4     "caret_extra_bottom": 1,
 5     "caret_extra_top": 1,
 6     "caret_extra_width": 1,
 7     "caret_style": "blink",
 8     "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
 9     "fade_fold_buttons": false,
10     "font_face": "Consolas",
11     "font_size": 17,
12     "ignored_packages":
13     [
14         "Vintage"
15     ],
16     "indent_guide_options":
17     [
18         "draw_normal",
19         "draw_active"
20     ],
21     "line_padding_bottom": 2,
22     "line_padding_top": 2,
23     "overlay_scroll_bars": "enabled",
24     "show_encoding": true,
25     "show_line_endings": true,
26     "theme": "Boxy Monokai.sublime-theme",
27     "theme_bar": true,
28     "theme_tab_selected_underlined": true
29 }

 

最终效果

猜你喜欢

转载自www.cnblogs.com/Fang-Hao/p/9152218.html
今日推荐