Sublime Text Settings

Jan 17, 2023

I use Sublime Text as my primary code editor, and I use it in a number of places (my work laptop, a personal laptop, my home desktop computer, etc.). As a help to myself in keeping the environments synced, here are the settings I like using within Sublime Text. Having this kind of thing logged somewhere is such a help when setting up new environments.

Last updated: May 15, 2024

{
    "auto_complete_commit_on_tab": true,
    "always_show_minimap_viewport": true,
    "bold_folder_labels": true,
    "caret_extra_top": 2,
    "caret_extra_bottom": 2,
    "color_scheme": "Mariana.sublime-color-scheme",
    "draw_minimap_border": true,
    "ensure_newline_at_eof_on_save": true,
    "font_face": "Consolas",
    "font_size": 10,
    "hardware_acceleration": "opengl",
    "hide_new_tab_button": true,
    "highlight_line": true,
    "highlight_modified_tabs": true,
    "ignored_packages":
    [
        "Vintage",
    ],
    "indent_guide_options": ["draw_normal", "draw_active"],
    "indent_to_bracket": true,
    "index_files": true,
    "revert_font_size": 10,
    "rulers": [80, 100],
    "scroll_speed": 0,
    "show_encoding": true,
    "show_line_endings": true,
    "theme": "Adaptive.sublime-theme",
}

These are the key-bindings that I use:

[
    { "keys": ["ctrl+shift+v"], "command": "paste" },
    { "keys": ["ctrl+v"], "command": "paste_and_indent" },
    { "keys": ["ctrl+="], "command": "file_diff_menu" },
    { "keys": ["ctrl+shift+="], "command": "file_diff_previous" },
    { "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
    { "keys": ["ctrl+shift+'"], "command": "change_quotes" },
    { "keys": ["ctrl+,"], "command": "prev_modification" },
    { "keys": ["ctrl+0"], "command": "revert_font_size" },

    // LSP
    // Jump to next Diagnostic in Tab
    {
        "keys": ["ctrl+k", "n"],
        "command": "lsp_next_diagnostic",
        "context": [{"key": "setting.lsp_active"}]
    },
    // Jump to previous Diagnostic in Tab
    {
        "keys": ["ctrl+k", "p"],
        "command": "lsp_prev_diagnostic",
        "context": [{"key": "setting.lsp_active"}]
    },

    // Origami
    { "keys": ["ctrl+k", "shift+up"], "command": "create_pane", "args": {"direction": "up"} },
    { "keys": ["ctrl+k", "shift+right"], "command": "create_pane", "args": {"direction": "right"} },
    { "keys": ["ctrl+k", "shift+down"], "command": "create_pane", "args": {"direction": "down"} },
    { "keys": ["ctrl+k", "shift+left"], "command": "create_pane", "args": {"direction": "left"} },
    { "keys": ["ctrl+k", "ctrl+up"], "command": "carry_file_to_pane", "args": {"direction": "up"} },
    { "keys": ["ctrl+k", "ctrl+right"], "command": "carry_file_to_pane", "args": {"direction": "right"} },
    { "keys": ["ctrl+k", "ctrl+down"], "command": "carry_file_to_pane", "args": {"direction": "down"} },
    { "keys": ["ctrl+k", "ctrl+left"], "command": "carry_file_to_pane", "args": {"direction": "left"} },
    { "keys": ["ctrl+k", "ctrl+z"], "command": "zoom_pane", "args": {"fraction": 0.9} },
    { "keys": ["ctrl+k", "ctrl+shift+z"], "command": "unzoom_pane", "args": {} },
]

Here also is my Package Control configuration, which includes a list of the packages I have installed on my primary work development system (which is where I do most of my development work anyways):

{
    "bootstrapped": true,
    "in_process_packages":
    [
    ],
    "installed_packages":
    [
        "A File Icon",
        "BracketHighlighter",
        "Center Comment",
        "ChangeQuotes",
        "Django Syntax",
        "DotENV",
        "Emmet",
        "FileDiffs",
        "Indent XML",
        "LSP",
        "LSP-json",
        "LSP-ruff",
        "MarkdownPreview",
        "Origami",
        "Package Control",
        "PackageResourceViewer",
        "PlainTasks",
        "Pretty JSON",
        "RevertFontSize",
        "Side-by-Side Settings",
        "SublimeLinter",
        "Terminus",
        "TodoReview",
    ],
}

2 Comments

Gary

3:22 PM on Jan 17, 2023

auto_complete_commit_on_tab

How do you handle the situation where the next character is a tab? I want to type "foo" but I get "foobar" because of the completion.

I just want it to always do the right thing but without reading my mind or maybe some neat AI it can't get it right.

Jonah

6:35 PM on Jan 17, 2023

I believe a Shift+Tab key combo will insert the actual tab character (or equivalent).

Leave a Comment

Ignore this field:
Never displayed
Leave this blank:
Optional; will not be indexed
Ignore this field:
Both Markdown and a limited set of HTML tags are supported
Leave this empty: