sublime开发环境

1、搭建gcc/g++编译器环境
https://www.cnblogs.com/deepcho/p/sublimetext3-c-program.html

https://blog.csdn.net/c1306049032/article/details/100164063?utm_medium=distribute.pc_relevant.none-task-blog-searchFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-searchFromBaidu-1.control

2、常用插件
2.1 :删除空行 ctrl+d
2.2 :代码格式化 ctrl+alt+f
2.3 : 删除空行:
Windows:

  • Ctrl+Alt+Backspace --> Delete Blank Lines
  • Ctrl+Alt+Shift+Backspace --> Delete Surplus Blank Lines
    列块操作:shift+鼠标右键
    显示函数列表:ctrl+r

//保存为xx.reg

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\SublimeText3]
@="Edit With SublimeText3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"

[HKEY_CLASSES_ROOT\*\shell\SublimeText3\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe %1"


[HKEY_CLASSES_ROOT\Directory\shell\SublimeText3]
@="Edit With SublimeText3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"

[HKEY_CLASSES_ROOT\Directory\shell\SublimeText3\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe %1"

3.选中文件后自动打开所在目录
syncsidebar
该功能的触发,是在已经打开的各个文件切换时,左侧目录树进行切换。 如果文件不切换,左侧目录树也不会切换。

4.xml文件格式化
indetxml(selection->format)

5、如何添加自定宏快捷键
https://www.cnblogs.com/binlucky/p/6970917.html

5.1、中文乱码,添加插件conver to utf-8
6、注册码
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
5653E0A0 BACE3948 BB2EE45E 422D2C87
DD9AF44B 99C49590 D2DBDEE1 75860FD2
8C8BB2AD B2ECE5A4 EFC08AF2 25A9B864
------ END LICENSE ------​

//keymap

[
	//前进后退
	{ "keys": ["alt+1"], "command": "jump_back" },
	{ "keys": ["alt+2"], "command": "jump_forward" },
	//删除当前行
	{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
	//全局搜索
	{ "keys": ["ctrl+1"], "command": "show_panel", "args": {"panel": "find_in_files"} },
    //当前文件搜索
	{ "keys": ["ctrl+2"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
    //自定义宏,添加一条打印语句
	{"keys": ["alt+d"], "command": "run_macro_file", "args": {"file":"Packages/User/debug_macro.sublime-macro"}},
]

{
	"color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
	"font_size": 13,
	"hot_exit": false,
	"ignored_packages":
	[
		"Vintage"
	],
	"remember_open_files": false,
	"show_encoding": true,
	"show_line_endings": true,
	"theme": "Adaptive.sublime-theme",
	"update_check": false
}

附录sublime自定义宏,添加打印
//DEBUG((EFI_D_ERROR,"[Debug by jiangfeng.zhang][fun:%a line:%d]:\n",FUNCTION,LINE));

[
	{
		"args": null,
		"command": "reindent"
	},
	{
		"args":
		{
			"characters": "DEBUG"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"contents": "($0)"
		},
		"command": "insert_snippet"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": ";"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"contents": "($0)"
		},
		"command": "insert_snippet"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "EFI_D"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "_E"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "RROR,"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"contents": "\"$0\""
		},
		"command": "insert_snippet"
	},
	{
		"args":
		{
			"characters": "[]"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "Debug"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": " by"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": " jiang"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "feng.z"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "hang"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "[]"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "fun:"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "%a"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": " line:"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "%d"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": ":"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "\\n"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": ",_"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "FUNC"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "TION"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "__"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": ","
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "__LINE"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"characters": "__"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": false
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "_"
		},
		"command": "insert"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"by": "characters",
			"forward": true
		},
		"command": "move"
	},
	{
		"args":
		{
			"characters": "\n"
		},
		"command": "insert"
	}
]

posted @ 2020-11-30 15:54  hostid  阅读(132)  评论(0编辑  收藏  举报