Sublime Text 2 - key binding to open recently?

How can I open Open Recent or "open last file" for quick access to the keyboard?

This is my pathetic attempt:

{ "keys": ["super+shift+r"], "command": "open_recent"} 

I tried to look at the console (Ctrl-`) when using Open Recent, but does not display anything.

In general, how can key bindings be combined? And is there a more suitable place for this question?

Thanks!

+6
source share
3 answers

I suggest you try a few packages:

https://github.com/spadgos/sublime-OpenRecentFiles

or

https://github.com/paccator/GotoRecent

And the easiest way to install them is with this management pack, the package: http://wbond.net/sublime_packages/package_control/installation

That should give you what you want ...

+2
source

Key bindings should be added to the user key binding settings. Adding default settings will also work, but the settings will be overwritten when installing a new version of Sublime Text 2.

Your attempt follows the general Sublime Text binding structure, but "open_recent" is not a valid command. From what I can find in the documentation, I think that the "Open Recent" menu keeps track of different file names and then opens openly depending on which file is selected, instead of calling the open_recent command.

If there is no way to get the name of the most recent file, perhaps you can write an extension that tracked the most recent file and then open it, but that was probably a pretty dumb solution.

+3
source

reopen_last_file command Therefore, you should add something like this:

 { "keys": ["ctrl+shift+r"], "command": "reopen_last_file" }, 

Little PS: I use ctrl+shift+t , so the shortcut for reopening the last document is consistent in my browser, IDE and editor.

+1
source

Source: https://habr.com/ru/post/903547/


All Articles