The Usual Suspects (1995)

We all want to know what’s in the secret sauce.

Package Control

Package Control is the Sublime Text package manager, but it needs to be installed.

Menu → Install Package Control

Once installed you can install any package from packagecontrol.io.

To install a package open the command palette.

Command Palette → Package Control: Install Package

Type the name of the package, and press enter. Done and done.

Look and Feel

I use an enhanced Monokai color scheme that I maintain called MonokaiFree. It’s more consistent and more polished than the one bundled with Sublime.

I love FileIcons. It brings colour icon support to the sidebar.

I use the built-in Adaptive theme.

Menu → Preferences → Select Theme → Adaptive

I love my custom yellow block cursor and square selections.

Menu → Preferences → Customize Color Scheme

{
    "variables": {},
    "globals": {
        "caret": "yellow",
        "block_caret": "yellow",
        "block_caret_border": "yellow",
        "block_caret_corner_style": "square",
        "selection_corner_style": "square",
    },
    "rules": []
}

Robert Llewellyn in Red Dwarf (1988)

Vim

I love Vim, but I’ve never been able to switch to it fully. Enter NeoVintageous, a vim emulator for Sublime. NeoVintageous is my weapon of choice.

I also use a number of optional NeoVintageous plugins.

Auto disabling highlight line in Insert and Visual modes is so good.

Some features in NeoVintageous require third party plugins. For instance, some window splitting commands require Origami and the jump to error commands require SublimeLinter.

Here are my settings.

Menu → Preferences → Settings

"vintageous_bell": "view",
"vintageous_enable_sneak": true,
"vintageous_handle_keys": {
    "<C-f12>": false,
    "<S-f1>": false,
    "<S-tab>": false,
    "<f1>": false,
    "i_<C-u>": false
},
"vintageous_sneak_use_ic_scs": 1,
"vintageous_terminal": "gnome-terminal",
"vintageous_use_ctrl_keys": true,
"vintageous_use_super_keys": true,
"scroll_context_lines": 8,

Here is a snippet of some useful mappings from my neovintageousrc file:

set ignorecase
set nominimap
set smartcase

let mapleader=,

nnoremap <leader><leader> :Neovintageous action=reveal_side_bar<CR>
nnoremap <leader>d :Neovintageous action=toggle_side_bar<CR>
nnoremap <leader>en :Neovintageous action=open_rc_file<CR>
nnoremap <leader>ga :silent !git add %<CR>
nnoremap <leader>gd :ToggleInlineDiff<CR>
nnoremap <leader>hu :RevertHunk<CR>
nnoremap <leader>oo :GitOpen<CR>
nnoremap <leader>r :reg<CR>
nnoremap <leader>sr :SublimeLinterLineReport<CR>
nnoremap <leader>st :SublimeLinterPanelToggle<CR>
noremap <C-l> :nohlsearch<CR>
noremap <C-s> :w<CR>
noremap <D-I> :ShowOverlay overlay=goto text=@<CR>
noremap <D-i> :GotoSymbolInProject<CR>

" Easy insertion of a trailing ;
nnoremap ;; <Esc>A;<Esc>;

" Yank and paste using system clipboard.
noremap <leader>y "+y
noremap <leader>Y "+Y
noremap <leader>p "+p
noremap <leader>P "+P

" Sorting.
nnoremap <leader>s) vi):sort u<CR>
nnoremap <leader>s] vi]:sort u<CR>
nnoremap <leader>si vii:sort u<CR>
nnoremap <leader>sp vip:sort u<CR>
nnoremap <leader>ss vip:sort u<CR>
vnoremap <leader>s :sort u<CR>

" Origami: https://packagecontrol.io/packages/Origami
nnoremap <leader>. :ToggleZoomPane fraction=0.98<CR>

Goto project

I use Sesame to quickly open, add, switch, and remove projects and folders. This is by far my favourite plugin. Read Sesame - A Sublime Text Plugin for a short guide on how it works.

Linting

I use SublimeLinter for linting. SublimeLinter is a comprehensive code linting framework. Here are some of the linters I use:

Documentation

I use GotoDocumentation for jumping to documentation for the current keyword. I like F1 as my jump key. The F1 key has become universally associated with help.1

Menu → Preferences → Key Bindings

{
    "keys": ["f1"],
    "command": "goto_documentation",
    "context": [
        {
            "key": "selector",
            "operator": "equal",
            "operand": "-embedding.php",
            "match_all": true
        }
    ]
},

The context selector exclusion is to support GotoPHPManual.

  • SideBarTools - Some useful tools for the sidebar context menu.

Markdown

Git

PHP

Window splitting

Syntaxes

Package development

Settings

Here are my settings. These will not suit everybody, but they might help you discover some that you didn’t know about.

Menu → Preferences → Settings

{

    "animation_enabled": false,
    "caret_extra_bottom": 0,
    "caret_extra_top": 0,
    "fade_fold_buttons": false,
    "file_tab_style": "square",
    "fold_buttons": false,
    "inactive_sheet_dimming": false,
    "mouse_wheel_switches_tabs": false,
    "relative_line_numbers": true,
    "save_on_focus_lost": true,
    "scroll_context_lines": 8,
    "show_build": true,
    "show_git_status_in_status_bar": false,
    "show_indentation": false,
    "show_line_column": "compact",
    "show_rel_path": true,
    "show_sidebar_button": false,
    "show_syntax": false,
    "show_tab_close_buttons": false,

    "color_scheme": "MonokaiFree.sublime-color-scheme",
    "theme": "Adaptive.sublime-theme",

    "font_face": "Cascadia Code",
    "font_options": ["gray_antialias", "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08", "ss09", "ss10", "ss19", "ss20"],

    "draw_white_space": [
        "leading_mixed",
        "selection",
        "trailing",
        "isolated"
    ],

    "indent_guide_options":
    [
    ],

    "rulers":
    [
    ],

    "auto_complete_cycle": true,
    "auto_complete_trailing_symbols": true,
    "auto_complete_use_history": true,
    "auto_complete_with_fields": true,

    "phpunit.options":
    {
        "no-coverage": true,
    },

    "vintage_ctrl_keys": true,
    "vintage_start_in_command_mode": true,
    "vintageous_bell": "view",
    "vintageous_enable_sneak": true,
    "vintageous_handle_keys": {
        "<C-f12>": false,
        "<S-f1>": false,
        "<S-tab>": false,
        "<f1>": false,
        "i_<C-u>": false
    },
    "vintageous_sneak_use_ic_scs": 1,
    "vintageous_terminal": "gnome-terminal",
    "vintageous_use_ctrl_keys": true,
    "vintageous_use_super_keys": true,
}

Some of these settings might seem weird. For example, no line numbers, no animations, hardly anything in the status bar, really? Yes. I very much like a clear screen.

I use NeoVintageous commands like yon to toggle line numbers on and off when I need them. NeoVintageous has other toggle commands like yow to toggle wrapping, yos spelling, yom minimap. So I need them on all the time.

I hope this has been helpful. Take it easy my friends.

  1. https://en.wikipedia.org/wiki/Function_key