Settings – Reference¶
See also
- Customization - Settings
- A detailed overview on settings in Sublime Text and their order of precedence.
Global Settings¶
Global settings can only be modified
in Preferences.sublime-settings and Preferences (<platform>).sublime-settings
(where <platform> can be any of Linux, OSX or Windows)
and, where indicated, also in .sublime-project files.
theme
Type str Default "Default.sublime-theme"Theme to be used. Accepts a base name for a
.sublime-themefile.
scroll_speed
Type float Default 1.0Controls the smooth scrolling feature.
- A value of
0disables smooth scrolling.- A value between
0and1makes scrolling slower.- A value of
1is the default scrolling speed.- A value larger than
1makes scrolling faster.
hot_exit
Type bool Default trueIf
trueand you exit the application or active window, Sublime Text will close the application or window without prompting, even if there are unsaved files. Unsaved files and the state of the active project will be restored the next time Sublime Text starts.
remember_open_files
Type bool Default falseIf
true, every time you start Sublime Text it will reopen the files that were open when the application was closed the last time.
open_files_in_new_window
Type bool Default trueOS X only. If
true, a new window is created when files are opened from Finder or by dragging them onto the dock icon.
close_windows_when_empty
Type bool Default (All) falseDefault (OS X) trueIf
trueand no folder is open in the active window, the window will be closed when the last file is closed.
show_full_path
Type bool Default (All) trueDefault (OS X) falseIf
true, show the active file’s full path in the title bar.
preview_on_click
Type bool Default trueIf
true, preview file contents when clicking on a file in the side bar. Files in preview will be closed automatically as soon as they lose focus (for example, if you pressEsc). Double-clicking or editing a file in preview will open the file in a tab.
folder_exclude_patterns
Type [str,] Default [".svn", ".git", ".hg", "CVS"]Accepts wildcards. Excludes the matching folders in the project from the side bar, Goto Anything and any project-wide action.
This setting must be used in a global
Preferences.sublime-settingsfile, or in folder items in a.sublime-projectfile.
file_exclude_patterns
Type [str,] Default ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj", "*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"]Accepts wildcards. Excludes the matching files in the project from the side bar, Goto Anything and any project-wide action.
This setting must be used in a global
Preferences.sublime-settingsfile, or in folder items in a.sublime-projectfile.
binary_file_patterns
Type [str,] Default ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"]Accepts wildcards. Excludes the matching files in the project from Goto Anything and any project-wide action, but not the side bar.
This setting must be used in a global
Preferences.sublime-settingsfile, or in folder items in a.sublime-projectfile.
show_tab_close_buttons
Type bool Default trueIf
false, hides close buttons in the tab bar until you hover the mouse over the tab bar.
mouse_wheel_switches_tabs
Type bool Default falseIf
trueand the cursor is in the tab bar, scrolling the mouse wheel will switch tabs.
ignored_packages
Type [str,] Default ["Vintage"]A list of packages that Sublime Text will ignore. Packages in this list will be disabled until you remove them from the list.
Some packages may not respond gracefully to being disabled/enabled via this setting. Therefore, after editing this setting, you should restart Sublime Text.
File Settings¶
Whitespace and Indentation¶
auto_indent
Type bool Default trueToggles automatic indentation. Automatic indentation will try to calculate the correct indentation when you press :kbd:´Enter´.
smart_indent
Type bool Default trueDepends on auto_indentToggles smart indentation. Smart indentation tries additional heuristics to calculate the correct indentation. when you press :kbd:´Enter´.
indent_to_bracket
Type bool Default falseDepends on auto_indentIf
true, adds whitespace up to the first open bracket when indenting.
tab_size
Type int Default 4Size of a tab in spaces.
translate_tabs_to_spaces
Type bool Default falseDetermines whether to replace a tab character with
tab_sizenumber of spaces whenTabis pressed.
use_tab_stops
Type bool Default trueIf
translate_tabs_to_spacesistrue, this setting will makeTabandBackspaceinsert/deletetab_sizenumber of spaces per key press.
trim_automatic_white_space
Type bool Default trueToggles deletion of whitespace added by
auto_indent.
detect_indentation
Type bool Default trueIf
false, disables detection of tabs vs. spaces whenever a buffer is loaded. Iftrue, it will automatically modifytranslate_tabs_to_spacesandtab_size.
draw_white_space
Type enum : str Default "selection"Valid values:
none,selection,all.
trim_trailing_white_space_on_save
Type bool Default falseIf
true, Sublime Text will remove whitespace from the active file before saving.
tab_completion
Type bool Default trueIf
true, pressingTabwill insert the best matching completion.If
false,Tabwill only trigger snippets or insert a tab.
Tabcan still be used to insert an explicit tab whentab_completionistrue.
auto_complete
Type bool Default trueIf
true, completions will be shown automatically while typing.
auto_complete_size_limit
Type int Default 4194304In files whose size is larger than this value, auto complete will stop being automatically triggered.
auto_complete_delay
Type int Default 50Delay in milliseconds before the auto complete window is shown after typing.
auto_complete_selector
Type str Default "meta.tag - punctuation.definition.tag.begin, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc"Selector denoting scopes where auto complete will be active.
auto_complete_triggers
Type [{ (enum : str) : str }, ] Default [{"characters": "<", "selector": "text.html"}]Additional situations to trigger auto complete.
auto_complete_commit_on_tab
Type bool Default falseBy default, auto complete will commit the current completion on
Enter.If
true, this setting will allow you to complete onTabinstead.Completing on
Tabis generally a superior option, as it removes the ambiguity between committing the completion and inserting a newline.
auto_complete_with_fields
Type bool Default falseDepends on auto_complete_commit_on_tabIf
true, auto complete will be also shown when snippet fields are active.
auto_complete_cycle
Type bool Default falseIf
true, pressingUpon the first item in the auto complete window will select the last item.If
false, the auto complete window will be closed in the same situation.Likewise for the
Downkey when the last item is selected.
auto_close_tags
Type bool Default trueIf
true, entering</will automatically close HTML and XML tags.
shift_tab_unindent
Type bool Default falseBy default,
Shift+Tabwill only unindent if the selection spans multiple lines. When pressingShift+Tabat other times, it will insert a tab character. This way, tabs can be inserted whentab_completionis enabled.If
true,Shift+Tabwill always unindent instead of inserting tabs.
copy_with_empty_selection
Type bool Default trueIf
true, thecopyandcutcommands will operate on the current line when the selection is empty instead of doing nothing.
find_selected_text
Type bool Default (All) trueDefault (OS X) falseIf
true, the selected text will be copied into the find panel when it’s shown.
auto_find_in_selection
Type bool Default falseIf
true, the Find in Selection flag will be enabled automatically when multiple lines are selected.
drag_text
Type bool Default trueIf
true, clicking on selected text will begin a drag-drop operation.Not currently implemented under Linux.
Visual Settings¶
always_show_minimap_viewport
Type bool Default falseIf
true, shows a rectangle on the minimap highlighting the file’s visible area. Iffalse, only shows the rectangle when you hover the cursor over the minimap.
color_scheme
Type str Default "Packages/Color Scheme - Default/Monokai.tmTheme"Sets the colors used for text highlighting. Accepts a path relative to the
Datadirectory (for example:Packages/Color Scheme - Default/Monokai Bright.tmTheme).
font_face
Type str Default (Linux) "Monospace"Default (OS X) "Menlo-Regular"Default (Windows) "Consolas"Font face to be used for editable text.
font_size
Type int Default (All) 10Default (OS X) 12Size of the font for editable text.
font_options
Type enum : str Default []Valid values:
bold,italic,no_antialias,gray_antialias,subpixel_antialias,directwrite(Windows).
gutter
Type bool Default trueToggles display of gutter.
line_numbers
Type bool Default trueIf
true, displays line numbers in the gutter.
margin
Type int Default 4Spacing between the gutter and the text.
fold_buttons
Type bool Default trueIf
true, you will see triangles next to lines that can be folded.
fade_fold_buttons
Type bool Default trueIf
true, the fold buttons will be hidden until you hover the mouse over the gutter.
rulers
Type float | [float,] Default []Columns at which to display vertical lines. Rulers help to visually indicate the length of a line. Accepts a list of numeric values (such as
[79, 89, 99]) or a single numeric value (for example,79).
draw_minimap_border
Type bool Default falseIf
true, draws a border around the minimap’s region corresponding to the the view’s currently visible text. TheminimapBorderkey of the active color scheme controls the border’s color.
highlight_line
Type bool Default falseIf
true, highlights lines where a caret is present.
line_padding_top
Type int Default 0Additional spacing at the top of each line, in pixels.
line_padding_bottom
Type int Default 0Additional spacing at the bottom of each line, in pixels.
caret_style
Type enum : str Default "smooth"Determines the style of the caret (text insertion point).
Valid values:
smooth,phase,blink,solid.
caret_extra_top
Type int Default 0Increases the size of the caret.
caret_extra_bottom
Type int Default 0Increases the size of the caret.
caret_extra_width
Type int Default 0Increases the width of the caret.
scroll_past_end
Type bool Default (All) trueDefault (OS X) falseIf
true, Sublime Text will leave a wide, empty margin between the last line and the bottom of the window.
word_wrap
Type bool | auto Default "auto"If
true, disables horizontal scrolling. If set toauto, will be disabled for source code and enabled otherwise.
wrap_width
Type int Default 0Depends on word_wrapIf greater than
0, wraps long lines at the specified column as opposed to the window width.
indent_subsequent_lines
Type bool Default trueDepends on word_wrapIf
false, wrapped lines will not be indented. Only has effect ifword_wrapis set totrue.
draw_centered
Type bool Default falseIf
true, text will be drawn centered rather than left-aligned.
match_brackets
Type bool Default trueIf
false, disables bracket highlighting for brackets enclosing the caret.
match_brackets_content
Type bool Default trueIf
true, the nearest bracket pair surrounding the caret will be highlighted. Otherwise, the caret has to be next to a bracket for highlighting to occur.
match_brackets_square
Type bool Default trueDepends on match_bracketsIf
false, stops highlighting square brackets. Only has effect ifmatch_bracketsistrue.
match_brackets_braces
Type bool Default trueDepends on match_bracketsIf
false, stops highlighting curly brackets. Only has effect ifmatch_bracketsistrue.
match_brackets_angle
Type bool Default falseDepends on match_bracketsIf
false, stops highlighting angle brackets. Only has effect ifmatch_bracketsistrue.
match_tags
Type bool Default trueIf
true, enables visualization of the matching tag in HTML and XML content.
match_selection
Type bool Default trueIf
true, highlights other occurrences of the selected text.
draw_indent_guides
Type bool Default trueIf
true, draws lines at every indentation level.The color of the indentation guides is controlled via the .tmTheme settings:
guide,activeGuideandstackGuide.
indent_guide_options
Type enum : str Default ["draw_normal"]Depends on draw_indent_guidesValid options:
draw_normal,draw_active.The
draw_activeoption will cause the indent guide containing the caret to be shown in a different color.
show_definitions
Type bool Depends on index_filesIf
true, hovering over a word will show a popup listing all possible locations for the symbol.
tree_animation_enabled
Type bool Default trueIf
true, animations will be shown in the sidebar when expanding or collapsing folders.
animation_enabled
Type bool Default trueIf
true, animations will be shown throughout the application.
hightlight_modified_tabs
Type bool If
true, makes tabs with unsaved changes more visible.
bold_folder_labels
Type bool Default falseIf
true, folder names in the side bar will be bold.
use_simple_full_screen
Type bool Default falseOS X only.
If
true, disables Lion-style full-screen support.Sublime Text must be restarted after changing this setting for it to take effect.
gpu_window_buffer
Type enum : (bool | str) Default "auto"OS X only.
Valid values:
true,false,auto.If
auto, it will enable the setting when running on a screen 2560 pixels or wider (for example, a Retina display).If
true, OpenGL is used to accelerate drawing.Sublime Text must be restarted after changing this setting for it take effect.
overlay_scroll_bars
Type enum : str Default "system"Valid values:
system,enabled,disabled.
enable_tab_scrolling
Type bool Default trueIf
true, tabs will scroll left and right instead of simply shrinking when there are too many to show on the tab bar.
show_encoding
Type bool Default falseIf
true, shows the active file’s encoding in the status bar.
show_line_endings
Type bool Default falseIf
true, shows the active file’s type of line endings in the status bar.
remember_full_screen
Type bool Default falseIf
true, allows Sublime Text to start in full-screen mode if it was exited in full-screen mode.If
false, Sublime Text will never start in full-screen mode.
always_prompt_for_file_reload
Type bool Default falseIf
true, always prompt before reloading a file.By default, prompting will only occur if a file has unsaved changes.
create_window_at_startup
Type bool Default trueOS X only.
If
true, an empty window will be created at startup.
show_panel_on_build
Type bool Default trueIf
true, shows the Build Results panel when building.If
false, the Build Results panel can be shown via theTools --> Build Resultsmenu item.
index_files
Type bool Default trueIf
true, file indexing parses all files in the side bar and builds an index of their symbols.Required for Goto Definition to work.
Symbols are only available for syntaxes that define them via
.tmPreferencesfiles.
index_workers
Type int Default 0Depends on index_filesSets the number of threads used for indexing.
If
0, Sublime Text will use all available cores.To disable indexing completely, use
index_files.
index_exclude_patterns
Type [str,] Default ["*.log"]Depends on index_filesIndicates which files will not be indexed.
Patterns in this list accept wildcards.
Automatic Behavior¶
auto_match_enabled
Type bool Default trueToggles automatic pairing of quotes, brackets, etc.
save_on_focus_lost
Type bool Default falseIf
true, saves files automatically when switching to a different file or application.
find_selected_text
Type bool Default (All) trueDefault (OS X) falseIf
true, the selected text will be copied into the find panel when the panel is opened.
word_separators
Type str Default "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?"Characters considered to divide words for actions like advancing the cursor, etc. Not used for every context where a notion of a word separator is useful (for example, word wrapping). In some contexts, the text might be tokenized based on other criteria (for example, the syntax definition rules).
ensure_newline_at_eof_on_save
Type bool Default falseIf
true, adds a new line at the end of the active file before saving if no new line is present.
System and Miscellaneous Settings¶
is_widget
Type bool Default nullIs set to
trueby Sublime Text if the buffer is an input field in a dialog, as opposed to a regular buffer.
spell_check
Type bool Default falseToggles the spell checker.
dictionary
Type bool Default "Packages/Language - English/en_US.dic"Word list to be used by the spell checker. Accepts a path relative to the
Datadirectory (such asPackages/Language - English/en_US.dic). You can add more dictionaries.
spelling_selector
Type str Default "markup.raw, source string.quoted - punctuation - meta.preprocessor.c.include, source comment - source comment.block.preprocessor, -(source, constant, keyword, storage, support, variable, markup.underline.link, meta.tag)"Depends on spell_checkScope selector to determine which scopes will be spell checked.
fallback_encoding
Type bool Default "Western (Windows 1252)"The encoding to use when the encoding can’t be determined automatically. ASCII, UTF-8 and UTF-16 encodings will be detected automatically .
default_encoding
Type str Default "UTF-8"Encoding used when saving new files, and files opened with an undefined encoding (for example, plain ascii files).
If a file is opened with a specific encoding (either detected or given explicitly), this setting will be ignored and the file’s encoding will be used to save the file.
enable_hexadecimal_encoding
Type bool Default trueIf
true, files containing null bytes will be opened as hexadecimal by default.
default_line_ending
Type bool Default "system"Determines what characters to use to designate new lines. Valid values:
system(OS-dependant),windows(CRLF) andunix(LF).
tab_completion
Type bool Default trueDetermines whether pressing
Tabwill insert completions.
File and Directory Settings¶
default_dir
Type str Default nullSets the default save folder for the view. If the value of this setting points to an existing folder, you will be prompted to save the file to that folder when you try to save the file.
atomic_save
Type bool Default falseIf
true, Sublime Text will save by writing to an alternate file and then renaming it over the original file.Atomic save attempts to reduce data loss by only removing the orginal file when the new file has been successfully written. Because the a file is first created and then renamed instead of being updated in place, many file listeners and virtual file systems will get confused. For this reason, it’s disabled by default.
Input Settings¶
command_mode
Type bool Default falseIf
true, the buffer will ignore key strokes. Useful when emulating Vim’s modal behavior.
move_to_limit_on_up_down
Type bool Default (All) falseDefault (OS X) trueIf
trueand the caret is on the first line, pressing the up arrow will move the caret to the beginning of the line. If the caret is on the last line, the down arrow will move the caret to the end of the last line.