Sublime Forum

Binding a shortcut key to open certain documents

#1

In Emacs one can add certain files to one’s init.el file which one can then open easily using a shortcut key without having to look for the file in question, such as:

(global-set-key (kbd "C-c g") (lambda() (interactive)(find-file "/home/user//commands.py")))

I would like to be able to do something similar in Sublime. Could someone guide me on the best way to achieve this?

0 Likes

#2
  1. Call Preferences: Key Bindings from Command Palette
  2. Paste the following content into the right pane.
	{
		"keys": ["ctrl+c", "g"],
		"command": "open_file",
		"args": {
			"file": "C:\\Data\\debug.php",
		},
	},
1 Like