List of Sublime Text 3 Commands

I have managed to compile a list of Sublime Text 3 commands that doesn’t have a default keyboard shortcut. The commands are grouped as follows under the respective menu items. I have also added a short description for some action items which I felt aren’t self-explanatory. Few commands require additional arguments. For example, the permute_lines command takes an argument called operation to determine how the command has to be applied on selected lines (reverse, unique, shuffle).  So, wherever applicable, arguments are also listed right below the commands. You can use these commands to create your own keyboard shortcuts via Sublime text Key bindings.

 

Sublime Text 3 Commands

File Menu

ActionCommand
Open Folderprompt_open_folder
Close All Filesclose_all
Clear Recent Files listclear_recent_files
Save All Filessave_all
Revert Filerevert

Edit menu

Reindentreindent
Wrap Lineswrap_lines
Sort Linessort_lines
Convert selected text to Title Casetitle_case
Swap case of selected textswap_case
Permute Lines – Reverse (Reverse arrange a list of selected lines)permute_lines

operation: reverse

Permute Lines – Shuffle (Shuffle a list of selected lines)permute_lines

operation: shuffle

Permute Lines – Unique (Remove duplicates from a list of selected lines)permute_lines

operation: unique

Permute Selection – Sort (Sort a group of selected text, case insensitively)sort_selection

case_sensitive: false

Permute Selection – Sort Case Sensitive (Sort a group of selected text, case sensitively)sort_selection

case_sensitive: true

Permute Selection – Reverse (Arrange a group of selected text in reverse order)permute_selection

operation: reverse

Permute Selection – Unique (Remove duplicates from a group of selected text)permute_selection

operation: unique

Permute Selection – Shuffle (Randomly Shuffle a group of selected text)permute_selection

operation: shuffle

 

Selection Menu

Invert selection (Deselects the manually selected text and select rest of the text in the current file.)invert_selection
Expand Selection to Paragraphexpand_selection_to_paragraph

 

Find Menu

Show results panelshow_panel
panel: output.find_results

 

View Menu

Show / Hide Open Filestoggle_show_open_files
Show / Hide Minimaptoggle_minimap
Show / Hide Tabstoggle_tabs
Show / Hide Status Bartoggle_status_bar
Show / Hide Menutoggle_menu
Groups -> Max Columns: 1set_max_columns

columns: 1

Groups -> Max Columns: 2set_max_columns

columns: 2

Groups -> Max Columns: 3set_max_columns

columns: 3

Groups -> Max Columns: 4set_max_columns

columns: 4

Groups -> Max Columns: 5set_max_columns

columns: 5

Syntaxset_file_type

syntax: package location

Indentation -> Indent using spacestoggle_setting

setting: translate_tabs_to_spaces

Indentation -> Tab width : <n>set_setting

setting: tab_size
value: <n>

Indentation -> Guess Settings from Bufferdetect_indentation
Indentation > Convert indentation to Spacesexpand_tabs

set_translate_tabs: true

Indentation > Convert indentation to Tabsunexpand_tabs

set_translate_tabs: true

Line Endings > Windowsset_line_ending

type: windows

Line Endings > Unixset_line_ending

type: unix

Line Endings > Mac OS 9set_line_ending

type: cr

Word Wraptoggle_setting

setting: word_wrap

Word Wrap Column > Automaticset_setting

setting: wrap_widthvalue: 0

Word Wrap Column > <70 | 78 | 80 | 100 | 120>set_setting

setting: wrap_widthvalue: <70 | 78 | 80 | 100 | 120>

Ruler > Noneset_setting

setting: rulersvalue: []

Ruler > <70 | 78 | 80 | 100 | 120>set_setting

setting: rulersvalue: [<70 | 78 | 80 | 100 | 120>]

 

Goto Menu

Goto Definitiongoto_definition

 

Tools Menu

Snippetsshow_overlayoverlay: command_palettetext: Snippet: (the trailing colon is purposeful)
Build Systemset_build_systemfile: <path to build file>
Save Macrosave_macro
New Pluginnew_plugin
New Snippetnew_snippet

 

Project Menu

Open Projectprompt_open_project_or_workspace
Switch Projectprompt_switch_project_or_workspace
Clear Recent Projects Listclear_recent_projects_and_workspaces
Save Projectsave_project_and_workspace_as
Close Projectclose_workspace
Edit Projectopen_filefile: ${project}”
New Workspace for Projectnew_window_for_project
Save Workspace As…save_workspace_as
Add Folder to Projectprompt_add_folder
Remove all Folders from Projectclose_folder_list
Refresh Foldersrefresh_folder_list

 

Preferences Menu

Browse Packages…open_dirdir: $packages
Settings – Defaultopen_filefile:${packages}/<path to settings file>
Settings – Useropen_filefile:${packages}/<path to settings file>
Font > Resetreset_font_size
Color Schemeset_user_settingfile: Preferences.sublime-settings
setting: color_schemevalue: <path to theme file>
Package Controlshow_overlayoverlay: command_palettetext: Package Control

 

Once I was trying to create a shortcut key for the reindent operation. I figured out I can do it with key binding. But I didn’t know the exact command name. Though I guessed it would be “reindent” (which is right too). Things got little complex for few actions. For instance, the right command of Convert indentation to Spaces is expand_tabsset_translate_tabs but not convert_indentation_to_spaces – as I would have guessed otherwise. And I searched a lot for references to get the list of commands in Sublime Text 3. I was not able to find the complete reference anywhere including the official documentation of Sublime Text 3.

So I just turned on command logging in Sublime Text 3 by using the following command.

sublime.log_commands(True)

And manually used each of the menu items to get commands from the console log to create the list. I hope it helped you. You can also check 8 Must Have Sublime Text Plugins.

ALSO READ  Sublime Text : Create Shortcut using Key Bindings

No Responses

Leave a Reply