Key binding for "New View into File"

The command you are looking for is clone_file.

You can see the commands asociated to sublime menus (main menu, side bar context menu, etc) inside the files with extension .sublime-menu located inside Sublime Text 3\Packages\Default.sublime-package. In this case the main menu file name is Main.sublime-menu.

Usually I find this Sublime Text Unofficial Documentation better and more complete than the original, it includes this command.


I solved this by navigating to Sublime Text --> Preferences --> Key Bindings

<code>Sublime Text</code> --> <code>Preferences</code> --> <code>Key Bindings</code>

and then adding the line

{ "keys": ["super+shift+x"], "command": "clone_file" }

to the Default (OSX).sublime-keymap file that Sublime Text 3 opens for you when you click Key Bindings

my Default (OSX).sublime-keymap file now looks like this

enter image description here

now I save my Default (OSX).sublime-keymap file and voila, cmd+shift+x now opens a New View into File 🎉

(a note - the super key in this Sublime Text 3 key binding maps to the cmd key on the Mac)


to find what command that is doing it, you open the console

ctrl + `
View > Show Console

and type/paste "sublime.log_commands(True)"

sublime.log_input(True)     # start logging input
sublime.log_input(False)    # stop logging input
sublime.log_commands(True)  # start commands input
sublime.log_commands(False) # stop commands input

here is output from to commands

command: left_delete

command: show_overlay {"overlay": "command_palette"}

if you want to set a new keyboard shortcut

{"keys": ["ctrl+alt+v"], "command": "left_delete"}
{"keys": ["ctrl+alt+b"], "command": "left_delete", "args": {"overlay": "command_palette" }}

Tags:

Sublimetext3