Подтвердить что ты не робот

Увеличить количество недавних проектов в Sublime Text 2?

Можно ли увеличить количество последних проектов, которые появляются в меню "Проекты → Недавние проекты" в Sublime Text 2? Я искал настройки, и ничего не нашел.

4b9b3361

Ответ 1

Редактировать этот файл:

~/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 недавних проектов

Ответ 2

Для возвышенного текста 3 я бы рекомендовал (основываясь на fooobar.com/info/156238/...) добавить новый файл 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, так как они присутствуют в исходном меню.