是否可以增加项目中出现的最近项目的数量 - > Sublime Text 2中的最近项目菜单?我搜索了设置,但我没有找到任何东西。
答案 0 :(得分:38)
编辑此文件:
~/Library/Application Support/Sublime Text 2/Packages/Default/Main.sublime-menu
在第715行附近你会看到:
"caption": "Recent Projects",
"mnemonic": "R",
"children":
[
{ "command": "open_recent_project", "args": {"index": 0 } },
{ "command": "open_recent_project", "args": {"index": 1 } },
{ "command": "open_recent_project", "args": {"index": 2 } },
{ "command": "open_recent_project", "args": {"index": 3 } },
{ "command": "open_recent_project", "args": {"index": 4 } },
{ "command": "open_recent_project", "args": {"index": 5 } },
{ "command": "open_recent_project", "args": {"index": 6 } },
{ "command": "open_recent_project", "args": {"index": 7 } },
{ "command": "open_recent_project", "args": {"index": 8 } },
{ "command": "open_recent_project", "args": {"index": 9 } },
{ "caption": "-" },
{ "command": "clear_recent_projects", "caption": "Clear Items" }
]
添加额外的
行{ "command": "open_recent_project", "args": {"index": n } },
即
"caption": "Recent Projects",
"mnemonic": "R",
"children":
[
{ "command": "open_recent_project", "args": {"index": 0 } },
{ "command": "open_recent_project", "args": {"index": 1 } },
{ "command": "open_recent_project", "args": {"index": 2 } },
{ "command": "open_recent_project", "args": {"index": 3 } },
{ "command": "open_recent_project", "args": {"index": 4 } },
{ "command": "open_recent_project", "args": {"index": 5 } },
{ "command": "open_recent_project", "args": {"index": 6 } },
{ "command": "open_recent_project", "args": {"index": 7 } },
{ "command": "open_recent_project", "args": {"index": 8 } },
{ "command": "open_recent_project", "args": {"index": 9 } },
{ "command": "open_recent_project", "args": {"index": 10 } },
{ "caption": "-" },
{ "command": "clear_recent_projects", "caption": "Clear Items" }
]
现在你有11个最近的项目
答案 1 :(得分:0)
对于崇高的文字3,我建议(基于https://stackoverflow.com/a/34512015/3061838)将具有以下内容的新文件Main.sublime-menu
添加到您的%APPDATA%\Sublime Text 3\Packages\User
文件夹中
[
{
"caption": "Project",
"id": "project",
"mnemonic": "P",
"children":
[
{
"caption": "Open Recent More",
"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 } },
{ "caption": "-" },
{ "command": "clear_recent_projects_and_workspaces", "caption": "Clear Items" }
]
},
]
},]
此解决方案的优点是它将在Sublime Text更新中保留下来。缺点是您将有2个最近打开的菜单。
由于原始菜单中存在这些行,因此您可以选择删除索引为0-7的行。