On OSX, at least, the Default.sublime-package is in the application itself: /Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package.
To edit the config easily without changes being overwritten on update, you need a copy of Main.sublime-menu in your Packages directory ~/Library/Application Support/Sublime Text 3/Packages/Default/Main.sublime-menu
The easiest way to effect these changes is to install the excellent PackageResourceViewer by skuroda (using Package Control), then:
- Command+Shift+p
- type ‘resource’ and select ‘PackageResourceViewer: Open resource‘
- you see a list of available packages: select ‘Default‘
- select ‘Main.sublime-menu‘
- PackageResourceViewer now copies
Main.sublime-menuinto the correct location and opens the new file for editing (note: the file doesn’t seem to be actually created in the filesystem until hitting save, and updates seem immediately visible without requiring an update). -
As per Rufus_12’s answer, alter the number of
open_recent_folderandopen_recent_filestatements that appear, increasing the index each time.{ "command": "open_recent_folder", "args": {"index": 0 } }, { "command": "open_recent_folder", "args": {"index": 1 } }, { "command": "open_recent_folder", "args": {"index": 2 } }, { "command": "open_recent_folder", "args": {"index": 3 } }, { "command": "open_recent_folder", "args": {"index": 4 } }, { "command": "open_recent_folder", "args": {"index": 5 } }, { "command": "open_recent_folder", "args": {"index": 6 } }, ...continue as many times as necessary...
Update re: maintainability
As @drevicko points out, this method will not auto-update with Sublime, and may even cause conflicts in future.
@James’ answer (editing the Packages/User/Default/Main.sublime-menus) is indeed update-proof, but does, unfortunately, result in a duplicate sub-menu (the duplicate entries appear for me at the very bottom of the menu). The user settings file is merged with the defaults, but in a manner which results in duplicate keys.
I find that if I update Packages/Default/Main.sublime-menus, then that file completely replaces the default (delete chunks and see your menus disappear in real time!) – my new file and the defaults are not merged.
In order to: a) avoid a duplicate entry, and b) stay current with Sublime updates, I can’t see an alternative to tracking changes to the file using git, and when Sublime updates, repeating the Open Resource process (overwriting your edits), then reverting only relevant changes.