Increase number of recent projects in Sublime Text 2?

后端 未结 2 1862
谎友^
谎友^ 2021-02-01 05:09

Is it possible to increase the number of recent projects that appear in the Projects -> Recent Projects menu in Sublime Text 2? I have searched through the settings and I haven\

2条回答
  •  离开以前
    2021-02-01 05:30

    Edit this file:

    ~/Library/Application Support/Sublime Text 2/Packages/Default/Main.sublime-menu
    

    At around line 715 you'll see this:

    "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" }
                ]
    

    Add additional lines of

    { "command": "open_recent_project", "args": {"index": n } },
    

    I.E.

    "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" }
                ]
    

    Now you have 11 recent projects

提交回复
热议问题