目前 Sublime Text 3 菜单中【Project】->【Open Recent】下的最近打开项目数只有8个,
对我不太够用,所以找了一下增加这个个数的方法,记录一下。
Linux :(其他系统类似)
原理:
Default.sublime-package 包中的 Main.sublime-menu 包含了菜单配置,
把这个文件复制到自定义配置目录,然后修改即可
操作:
// step 1: 创建自定义配置目录
$ mkdir ~/.config/sublime-text-3/Packages/Default/
// step 2: 解压其中的 Main.sublime-menu 到新建的目录
$ unzip -p /opt/sublime_text/Packages/Default.sublime-package Main.sublime-menu > ~/.config/sublime-text-3/Packages/Default/Main.sublime-menu
// step 3: 编辑 Main.sublime-menu,找到 "caption": "Project", 在下面添加一些条目(这里我添加到了20个)
// 如果想添加【File】菜单下的,方法类似
{
"caption": "Open Recent",
"children":
[
{ "command": "open_recent_project_or_workspace", "args": {"index": 0 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 1 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 2 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 3 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 4 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 5 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 6 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 7 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 8 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 9 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 10 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 11 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 12 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 13 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 14 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 15 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 16 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 17 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 18 } },
{ "command": "open_recent_project_or_workspace", "args": {"index": 19 } },
{ "caption": "-" },
{ "command": "clear_recent_projects_and_workspaces", "caption": "Clear Items" }
]
}