documents/dev/Sublime Text.md

Sublime Text

Create shortcut ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

My Shortcuts

  • ctrl+cmd+r - reveal file in sidebar

Packages

  • Vintageous -
  • Sass - afterwards, cmd+shift+p, Set Syntax: SCSS

Vim Mode

To enable VIM mode:

"ignored_packages": [],
"vintage_start_in_command_mode": true

Preferences.sublime-settings

// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by syntax-specific settings.
{
	"ignored_packages": [
	],
	"vintage_start_in_command_mode": true,
	"caret_style": "phase",
	"highlight_line": true,
	"align_indent": true,
	"mid_line_tabs": false,
	"alignment_chars": ["=", ":"],
	"alignment_space_chars": ["=", ":"],
	"alignment_prefix_chars": [
		"+", "-", "&", "|", "<", ">", "!", "~", "%", "/", "*", "."
	],
	"color_scheme": "Mariana.sublime-color-scheme",
	"folder_exclude_patterns": ["node_modules"],
	"vintageous_use_ctrl_keys": true,
}

Default (OSX).sublime-keymap

[
	{
		"keys": ["j", "j"],
		"command": "exit_insert_mode",
		"context": [
			{ "key": "setting.command_mode", "operand": false },
			{ "key": "setting.is_widget", "operand": false }
		]
	},
	{ "keys": ["g", "t"], "command": "next_view" },
	{ "keys": ["g", "T"], "command": "prev_view" },
	{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar"},

	{ "keys": ["super+v"], "command": "paste_and_indent" },
	{ "keys": ["super+shift+v"], "command": "paste" }
]

Linting

Install SublimeLinter

  • cmd + shift + p, install package control
  • cmd + shift + p, Package Control: Install Package
    • SublimeLinter
    • SublimeLinter-eslint
    • SublimeLinter-csslint
  • Install linter node package
    • npm install -g eslint
  • Set the paths
    • which eslint
    • Preferences - Package Settings - SublimeLinter
// SublimeLinter Settings - User
{
    "linters": {
        "eslint": {
            "env": {"PATH":"/Users/dominip/.nvm/versions/node/v14.15.4/bin/"}
        }
    },
    "paths": {
        "linux": [],
        "osx": [
            "/Users/dominip/.nvm/versions/node/v14.15.4/bin/",
        ],
        "windows": []
    }
}