Increase number of recent projects in Sublime Text 2?

For sublime text 3 I would recommend (based on https://stackoverflow.com/a/34512015/3061838) to add a new file Main.sublime-menu to your %APPDATA%\Sublime Text 3\Packages\User folder with the following content

[
    {
        "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" }
                ]
            },
        ]
    },]

The advantage of this solution is that it will survive Sublime Text updates. The disadvantage is that you will have 2 open-recent menus.

You may choose to remove the lines with index 0-7 since they are present in the original menu.


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

Tags:

Sublimetext2