Create Sublime Text User Preferences File

The purpose of this web site is two-fold. First, it explains in detail fifty-one of the options in Sublime Text’s Preferences.sublime-settings file. (The final version will explain all 101 options.) And second, it allows you to create a customized preferences file that you can install in your own Sublime environment.

This entire page is one large form, and submitting it takes you to a page with a customized Preferences.sublime-settings file that you can copy, bookmark, and/or share. Read more here.

Note: This site is in beta, meaning that some features, such as collapsible headings, have yet to be implemented, some other features may have small bugs (although not one has been discovered), and many options are missing. Bugs, issues, and feature requests should be submitted via Bitbucket.

— Roy Vanegas

Color Scheme

"color_scheme": "Packages/Color Scheme - Default/ ",

Sublime includes 22 color schemes, which are often referred to as color themes and should not be confused with a Sublime “theme.”

Font Face

"font_face": " ",

This option controls the font used for editing your documents. The default value — leaving it blank — causes a font face specific to your operating system to be used.

Note

If you include the name of a font that isn’t installed in your computer, or if you make a typo in one that is, Sublime treats this option as though it were left blank.

Font Size

"font_size": ,

This option changes the size of the fonts used in your documents. A list of options is included for you below, but, you can enter any number you wish.

Font Options

"font_options": [ ],

Word Separators

"word_separators": " ",

There are 33 characters that Sublime considers word separators. Each is grouped into a single string, but a few important characters have been excluded.

For example, the en dash (–), em dash (—), underscore (_), left single quote (‘), right single quote (’), left curly quotes (“), and right curly quotes (”) are all missing from the list. As a convenience, these extra characters have been appended to the original list and made available as an option below.

Note: you may edit either one of these options in the final file that is generated when you submit this form.

Line Numbers

"line_numbers": ,

Line numbers are drawn in the gutter by default, and to see them, the gutter option must be enabled. Set this option to false in order to hide line numbers in the gutter.

Gutter

"gutter": ,

In print design, the gutter is the white space area along the binder where pages meet. If you were holding a book open, for example, the left-facing page’s gutter would be on the right, while the right-facing page’s gutter would be on the left.

This concept is applied in Sublime as the left area of your document’s page, beyond where any text appears, and works in tandem with the margin option, which defines the distance of the margin from the gutter.

For example, if you set margin to 40 and gutter to true, then the margin is placed 40 pixels from the gutter. If you set gutter to false, then margin is ignored and no gutter is displayed.

Margin

"margin": ,

By default, Sublime adds 4 pixels of space between the gutter and margin. You may use integers with this option, meaning that negative numbers are allowed.

Fold Buttons

"fold_buttons": ,

Perhaps better referred to as fold “triangles,” fold buttons are small, direction-pointing triangles drawn in the gutter that indicate whether a block — or region — of text can be collapsed. Clicking a fold button in the gutter collapses a balanced region of text, much like pressing down on an accordion hides its bellows.

Note: If line numbers are showing in the gutter ("line_numbers": true), then the buttons are drawn to the right of the line numbers.

Fade Fold Buttons

"fade_fold_buttons": ,

This option controls whether the fold buttons are shown or not when a user hovers the mouse anywhere over the gutter. Set this option to false to always show the fold buttons, regardless of whether you’re hovering your mouse over the gutter or not.

Rulers

"rulers": ,

This option creates vertical lines — or rulers — to help you to see indentation and margins. You may have one or more rulers, and the default is to leave this option empty, which yields no ruler at all.

Some pre-defined rulers are listed below, or you can edit the resulting file to include your own rulers.

Spell Checking

"spell_check": ,

Sublime’s spell checker is turned off (false) by default. When enabled, spell checking uses an English dictionary. See the dictionary option for more.

Tab Size

"tab_size": ,

By default, Sublime sets a tab key press equal to 4 characters. Negative values and 0 are treated as though a 1 were entered.

Translate Tabs to Spaces

"translate_tabs_to_spaces": ,

Set this option to true to insert spaces instead of tabs when the tab key is pressed. By default, tabs are interpreted literally by Sublime: tab keystrokes render tab entries in your document.

This option works in concert with the tab_size option. For example, setting this option to true and tab_size to 3 would insert 3 space characters for every tab keystroke.

Use Tab Stops

"use_tab_stops": ,

When set (true), this option enables the use of the backspace character to delete a tab’s worth of space, if tabs are inserting spaces instead of tabs in a document. Let me clarify with an example. Imagine you have the following Sublime Text settings:

  1. "tab_size": 3
  2. "translate_tabs_to_spaces": true
  3. "use_tab_stops": true

The first option sets the width of a tab character equal to three spaces, regardless of whether Sublime is entering spaces or tabs when the tab key is pressed. (See the next option.)

The second option inserts spaces instead of tabs when the tab key is pressed. Because 3 is the value to the tab_size option, three spaces are entered into the document every time the tab key is pressed; no tab character is entered. This is equivalent to pressing the space bar three times every time the tab key is pressed.

The third option—this one—allows a user to hit the backspace/delete key and delete a tab’s worth of space, in this case, three characters. If use_tab_stops were set to false, then every time you’d type the backspace/delete key, only one space character would be deleted, not the grouping defined by tab_size.

This option also works with the Convert Indentation to Spaces option that appears in the lower right corner of the file window in Sublime Text.

Detect Indentation

"detect_indentation": ,

Upon load of a document, Sublime Text performs an analysis of white space, setting the options tab_size and translate_tabs_to_spaces. This is useful when wanting to retain the format of an existing file. For example, you have tabs being interpreted as spaces, and each tab is converted to 3 spaces, but you work temporarily on a file that only has tabs that are 4 spaces wide.

You might turn this option off if you were refactoring a messy code base to your standards, or if you wanted to make sure that all your source code was formatted exactly as you intended.

Auto Indent

"auto_indent": ,

When auto_indent is enabled, pressing the return key aligns the cursor at the current level of indentation. For example, if you were working in a block of text that was indented by 9 spaces and then pressed the return key, the cursor would align at 9 spaces on the next line, saving you the trouble of having to hit the space bar 9 times to align the next block of content. If this option were disabled (false), pressing the return key would place the cursor at the beginning of the line.

This option works closely with smart_indent, trim_automatic_white_space, and indent_to_bracket. An explanation of their inter-relation is pending.

Trim Automatic White Space

"trim_automatic_white_space": ,

This option removes white space that appears on a line by itself. It’s usually added by mistake, and is hard to see because it’s white space. Let’s look at an example:

<p>This is the first paragraph…</p>
⋅⋅⋅
<p>and this is the second one.</p>

The three highlighted dots between the paragraphs represent three spaces that were mistakenly included in the document. Enabling trim_automatic_white_space would automatically delete it when you hit the return key.

Note: if you open a file that already has white space on one or more lines, it won’t delete the existing white space, but won’t add to it, either, when you hit return key.

Word Wrap

"word_wrap": ,

This option works in tandem with wrap_width. See how these options work together for both source code and non-source code below. And, note that word_wrap plays nicely with the rulers option.

Options File contains…
word_wrap wrap_width …code …text
auto 0 Content wraps at the window’s width, and reflows with the window’s resizing. Content wraps at the window’s width, and reflows with the window’s resizing.
auto positive non-zero numeric value Content wraps at the non-zero numeric value, but doesn’t reflow with the window’s resizing. Content wraps at the non-zero numeric value, but doesn’t reflow with the window’s resizing.
true 0 Content wraps at the window’s width, and reflows with the window’s resizing. Content wraps at the window’s width, and reflows with the window’s resizing.
true positive non-zero numeric value Content wraps at the non-zero numeric value, but doesn’t reflow with the window’s resizing. Content wraps at the non-zero numeric value, but doesn’t reflow with the window’s resizing.
false 0 wrap_width is ignored; content does not wrap, and resizing the window generates a horizontal scrolling. wrap_width is ignored; content does not wrap, and resizing the window generates a horizontal scrolling.
false positive non-zero numeric value The numeric value to wrap_width is ignored; content does not wrap, and resizing the window generates a horizontal scrolling. The numeric value to wrap_width is ignored; content does not wrap, and resizing the window generates a horizontal scrolling.

Wrap Width

"wrap_width": ,

Working closely with the word_wrap option, wrap_width accepts a numeric value representing the right column at which your content will wrap. Setting this option to 80, for example, forces content to wrap at the 80th column.

Keeping the default value of 0 sets the right margin to st’s right window margin. If the word_wrap option is set to auto or true, then your document’s content will reflow when the window is resized. If, however, word_wrap is set to false, then no reflow will occur if the amount of characters on any line in your document exceeds the window’s width and the window is resized. See the word_wrap option for more.

Consider setting the rulers option to the same value as wrap_width in order to visualize the right wrap column. For example, "rulers": [80] would work symbiotically with "wrap_width": 80.

Draw Centered

"draw_centered": ,

Instead of using the left margin of the window to display your left-to-right content (such as how the English language flows), Sublime can render your document in the middle of the page. The word_wrap and wrap_width options affect how draw_centered behaves.

All the ideas that govern how word_wrap and wrap_width interact apply when draw_centered is set to true, but in a centered context.

Dictionary

"dictionary": " ",

When enabled, Sublime defaults to an English dictionary that spell checks American spellings of words, such as color and tire. Use this option to switch to the British-based dictionary included with Sublime, or follow these instructions to install a different dictionary altogether.

Draw Minimap Border

"draw_minimap_border": ,

A real-time, compressed version of your document is visualized in the upper right-hand corner of the Sublime Text window. The minimap is a scaled down visualization of the viewport layered on top of the minimap. This option draws a border around the viewport.

Note: If always_show_minimap_viewport, which is the following option, is disabled, the border is only drawn around the viewport when you hover your mouse over the minimap or directly below it.

Always Show Minimap Viewport

"always_show_minimap_viewport": ,

The viewport is the section of a document that fits in a Sublime Text window. Sublime can persistently visualize a scaled down version of the viewport on top of the minimap in the upper right-hand corner.

Highlight Line

"highlight_line": ,

This option highlights the line on which the caret/cursor is currently on by making lighter the background color of the entire line, making it easier to locate the caret/cursor.

Caret Style

"caret_style": " ",

The caret is the vertical bar next to your text that indicates the entry/delete point. Sublime gives you some options as to how the caret, or vertical bar, is rendered.

Blink
…yields a caret that resembles the flashers/hazzards of a car.
Phase
…yields a “breathing” caret, akin to the “sleeping” led of your computer.
Smooth
…yields a softer caret than blink, but harder than phase. The difference is subtle.
Solid
…yields a static, non-animated caret.

Match Brackets

"match_brackets": ,

Sublime can underscore balanced blocks defined by square ([]), curly ({}), and/or angle (<>) brackets when the cursor appears either within the block or to the left or right of a bracket. For any of the bracket options to work, the match_brackets option must be enabled.

Match Brackets Content

"match_brackets_content": ,

When enabled, match_brackets_content will underscore brackets when the cursor is within a bracketed block. When disabled, this option will only underscore brackets when the cursor is sitting immediately to the left or right of a bracket.

This option only affects the match_brackets_square, match_brackets_braces, and match_brackets_angle options that are enabled. (See the following three options.)

Match Brackets Square

"match_brackets_square": ,

This option underscores square brackets ([]), with the option match_brackets_content determining when brackets are underscored. The match_brackets option must be enabled for this option to work.

Match Brackets Braces

"match_brackets_braces": ,

This option underscores curly braces ({}), with the option match_brackets_content determing when braces are underscored. The match_brackets option must be enabled for this option to work.

Match Brackets Angle

"match_brackets_angle": ,

This option underscores angle brackets (<>), with the option match_brackets_content determining when braces are underscored. The match_brackets option must be enabled for this option to work.

Scroll Past End

"scroll_past_end": ,

Instead of aligning the bottom of your file with the bottom of the window, this option appends “virtual” white space at the end of your file so the content at the bottom can scroll up, making the lower portion of your document easier to read. The white space added at the bottom is virtual because it’s not part of the file; it’s only present in order to allow you to scroll up.

IntelliJ, WebStorm, PhpStorm and other JetBrains products call this option “Show virtual space at file bottom.”

Draw White Space

"draw_white_space": ,

Drawing white space visualizes tabs and spaces used in a file. This is useful when formatting a file, or refactoring, for example.

Keeping the initial value of selection shows white space characters only when content is selected, such as triple-clicking a line in a file.

Setting this value to none never shows white space characters, and setting it to all always shows white space characters, regardless of whether content is selected or not.

Trim Trailing White Space on Save

"trim_trailing_white_space_on_save": ,

Adding white space at the end of a line is a mistake because it doesn’t add any syntactic or content-based value to your document. And, since it’s white space, it can’t be seen.

Setting this option to true fixes the problem by removing any white space at the end of a line when the document is saved.

Ensure Newline at EOF on Save

"ensure_newline_at_eof_on_save": ,

In 1989, the standard for the C programming language stated that non-empty files shall end in a new-line character. We’ve been adding new lines ever since, and some programming language linters will complain. Setting this option to true will add a new line at the end of the file, if the file doesn’t already have one.

Save on Focus Lost

"save_on_focus_lost": ,

Sublime can save files automatically when you shift focus away from the document on which you’re working. This can have troubling side effects if you’re not paying attention and mistakenly edit a file.

The default is to disable this option, meaning that you’re prompted to save changes before closing any file.

Default Line Ending

"default_line_ending": ,

The new lines, or line feeds, in the new files you create may be associated with your current operating system, unix, which uses one character—the line feed character — to represent new lines, or Windows, which uses two characters — a carriage return and a line feed—to represent new lines.

Copy With Empty Selection

"copy_with_empty_selection": ,

Copying empty lines is generally considered a mistake, since it overwrites content you likely do not want overwritten with a new line character. (Note: Copying content only containing white space is not considered an empty line.) Copying empty lines is enabled by default. Set this option to false to disable it.

Drag Text

"drag_text": ,

If you’ve used Microsoft Word or OpenOffice Text Document before, you probably have used the drag-and-drop feature attached to selected text. This feature, which isn’t currently implemented in Linux, is enabled by default in Sublime.

Tree Animation Enabled

"tree_animation_enabled": ,

When Sublime Text opens a folder, it does so in a vertical pane along the left. This option controls the animation associated with the collapsing and expansion of folders in that left pane.

Note: This option only works if the animation_enabled option is enabled. (See the next option.)

Animation Enabled

"animation_enabled": ,

This option enables/disables the animations associated with the creation and relocation of tabs along the top of the window.

Note: If this option is disabled, the value of the previous option, tree_animation_enabled, is ignored, because all animations are disabled by this option.

Highlight Modified Tabs

"highlight_modified_tabs": ,

This option highlights a file’s tab when the file has been modified. This is usually done by changing the color of the content in the tab. By default, this option is disabled, meaning that a file’s tab is un-changed when the file has been modified.

Overlay Scroll Bars

"overlay_scroll_bars": ,

The disabled option keeps the scroll bar in view at all times, and doesn’t overlay the scroll bar over the minimap.

The enabled option reveals the scroll bar only when the page is scrolled. If the scroll bar reaches the minimap area in the upper right hand corner, the scroll bar appears over the minimap.

The system option, which is the default, enforces the option invoked by your operating system. disabled is the default option on Mac OS X, version 10.11.1, and in Windows 10.

Show Encoding

"show_encoding": ,

Displays the encoding of the file in the window’s bottom status bar, on the right. The default is to not show it.

Show Line Endings

"show_line_endings": ,

Displays the line endings of the file in the window’s right bottom status bar, to the right of the character encoding, if it was enabled. The default is to not show it.

Hot Exit

"hot_exit": ,

With hot_exit enabled, closing Sublime when modified files exist causes those files to be cached, not saved, by Sublime. This is automatic, without notification to the user. If the modified files were opened in another program, changes would not appear.

Launching Sublime anew restores the files from the cache. In other words, only Sublime is aware of unsaved changes when hot_exit is true.

Disabling this option makes Sublime prompt the user to save any modified files before exiting. If the user chooses not save changes, then changes are lost; Sublime does not cache the changes.

The aforementioned applies to projects, also.

Always Prompt for File Reload

"always_prompt_for_file_reload": ,

If a file that’s being edited by Sublime is modified by another program, the user is notified that the file has “changed on disk” and asks whether she/he would like to “reload it.” For example, imagine you’re editing a file called “index.html” with Sublime. Later on, you start editing the file with TextWrangler, forgetting that it’s already open in Sublime (because you have many files open).

You then switch over to Sublime, which will prompt you, as discussed earlier, to reload the file. If this option were disabled, Sublime would reload “index.html,” complete with changes made by TextWrangler, without your knowledge.

Open Files in New Window (OS X-specific)

"open_files_in_new_window": ,

This option is Macintosh-specific. It controls whether files dragged over the Sublime icon in The Dock, or set to open with Sublime by default, are opened in a tab alongside other files, or in their own window. The default is to open files in their own window.

Create Window at Startup (OS X-specific)

"create_window_at_startup": ,

By default, Sublime creates an empty window at startup. You may, however, launch Sublime with no window at all.

Show Full Path

"show_full_path": ,

Sublime’s default value for this option is to show the current file’s path, starting at the home folder, in the window’s title bar. Disabling this option renders only the file’s name in the title window.

Preview on Click

"preview_on_click": ,

If you preview one or more files in the left sidebar, enabling this option allows users to single-click a file’s icon to preview it in the main window space on the right. A tab is assigned to the previewed file.

If this option is disabled, you’ll have to double-click a file’s icon to preview it; single-clicking does nothing.