Sublime Text 3 增加 Open Recent 个数

目前 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" }
    ]
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

a_ran

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值