Skip to content

Instantly share code, notes, and snippets.

@LucaCappelletti94
Last active November 17, 2023 19:23
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LucaCappelletti94/d12c4c003e126f864402a887339fa912 to your computer and use it in GitHub Desktop.
Save LucaCappelletti94/d12c4c003e126f864402a887339fa912 to your computer and use it in GitHub Desktop.
A quick guide to get a super sublime text

Sublime Text on Steroids 💪

Getting Sublime

Sublime Text is an awesome text editor. You can get it either from its website or, if you are on a mac, by running the following:

brew cask install sublime-text

Package Control

Now you need Package Control, that you can either install via the command they offer on their website or, if you have an updated version of Sublime Text, you should find an option to install it under "Tools".

Installing some cool packages

By editing settings

If you open up your package control user preferences, paste the following:

{
  "bootstrapped": true,
  "in_process_packages":[],
  "installed_packages":[
    "Package Control"
  ]
}

Now you'll just have to add the options that you'd like to have installed in the "installed_packages" key, for example to add "IntelliDocs" you would write:

{
  "bootstrapped": true,
  "in_process_packages":[],
  "installed_packages":[
    "Package Control",
    "IntelliDocs"
  ]
}

Manually via super + shift + P

Alternatively, you can go with super + shift + P and type in install, so that the voice Package Control: Install Package should pop out. Then you just need to write in the name of the package you'd like to install and hit enter.

From their repository

Sometimes it happens that a package is not updated on the Package Control and you might want to get the latest version from the repo. This can be achieved by hitting super + shift + P and type in repository, so that the voice Package Control: Add Repository should pop out. Then you just paste the url of the repo you'd like to add.

Utilities

These are some packages I always install. Just add these to the list above, or if you'd like to install everything I use, just scroll to the bottom. A log should pop up and gradually show additional information for each package. READ THEM CAREFULLY as things might have changed since I wrote this guide.

In order, this packages allow you to:

  • BracketHighlighter: shows you in a richer way the brackets.
  • ClearConsole: clears the junk in the sublime text console by hitting alt+y.
  • Color Highlighter: colors the hexa and names of colors, such as "red" or "#ee3333".
  • IntelliDocs: for smarted code complete.
  • MarkdownEditing: a smarted editor for markdown files.
  • Predawn: a nicer UI.
  • Predawn Monokai: monokai theme for predawn.
  • SideBarEnhancements: enhance the capabilities of sublime text side bar.
  • SublimeLinter: the package that allows you to install linters.
  • SublimeLinter-annotations: a linter package for TODO and other annotations.
  • SublimeLinter-json: a linter package for json files.
  • AlignTab: creates a table environment.
  • Expand Region: allows for smarter automatic selection.
  • Inc-Dec-Value: Enables a select-like scroll in values and lists.
  • MultiEditTools: steroids for sublime multi-cursor capabilities.
{
  "installed_packages":
  [
    "BracketHighlighter",
    "ClearConsole",
    "Color Highlighter",
    "IntelliDocs",
    "MarkdownEditing",
    "Predawn",
    "Predawn Monokai",
    "SideBarEnhancements",
    "SublimeLinter",
    "SublimeLinter-annotations",
    "SublimeLinter-json",
    "AlignTab",
    "ExpandRegion",
    "Inc-Dec-Value",
    "MultiEditUtils"
  ]
}

Web development

These are some packages helpfull in web development. I wont describe obviously named packages with tautologies.

  • Emmet: allows for some quick html and css code.
  • HTML5: adds support for the HTML5 syntax.
  • Sass: adds support for the Sass syntax.
  • SCSS: adds support for the Sass syntax.
  • SublimeLinter-contrib-sqlint: adds lint support for sql code.
  • SublimeLinter-jshint: adds lint support for javascript code.
  • SublimeLinted-php: adds lint support for php code.
{
  "installed_packages":
  [
    "Emmet",
    "HTML5",
    "Javascript Beautify",
    "JavaScript Snippets",
    "PHPIntel",
    "Sass",
    "SCSS",
    "SublimeLinter-contrib-sqlint",
    "SublimeLinter-jshint",
    "SublimeLinter-php"
  ]
}

LaTex

For LaTex support on Sublime Text I wrote a separate guide over here.

Tailored settings

Now open the user settings of sublime text by hitting super+,. Basically just dump these in:

{
	"auto_complete_commit_on_tab": true,
	"auto_complete_triggers":
	[
		{
			"characters": "<",
			"selector": "text.html"
		},
		{
			"characters": "\\",
			"selector": "text.tex.latex"
		}
	],
	"binary_file_patterns":
	[
		"*.jpg",
		"*.jpeg",
		"*.png",
		"*.gif",
		"*.ttf",
		"*.tga",
		"*.dds",
		"*.ico",
		"*.eot",
		"*.pdf",
		"*.swf",
		"*.jar",
		"*.zip",
		"*.dmp",
		"*/min/*.js",
		"*/min/*.css",
		"*/min/*.map"
	],
	"bold_folder_labels": true,
	"close_windows_when_empty": false,
	"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
	"draw_minimap_border": true,
	"file_exclude_patterns":
	[
		"*.pyc",
		"*.pyo",
		"*.exe",
		"*.dll",
		"*.obj",
		"*.o",
		"*.a",
		"*.lib",
		"*.so",
		"*.dylib",
		"*.ncb",
		"*.sdf",
		"*.suo",
		"*.pdb",
		"*.idb",
		".DS_Store",
		"*.class",
		"*.psd",
		"*.db",
		"*.dbth",
		"*.md5",
		"*.auxlock",
		"*-figure*.*",
		"config.rb",
		"config.codekit",
		"cache.properties",
		"*.map",
		"*.orig",
		"*.acn",
		"*.acr",
		"*.alg",
		"*.aux",
		"*.toc",
		"*-blx.bib",
		"*.bak*",
		"*.bbl",
		"*.blg",
		"*.dvi",
		"*.glsdefs",
		"*.idx",
		"*.ilg",
		"*.ind",
		"*.ist",
		"*.out",
		"*.ps",
		"*.xdy",
		"*.bcf",
		"*.fls",
		"*.pdf",
		"*.fdb_latexmk",
		"*.run.xml",
		"*.tex.bak",
		"*_contourtmp0.dat",
		"*_contourtmp0.script",
		"*.synctex*",
		"*.ipynb"
	],
	"folder_exclude_patterns":
	[
		".svn",
		".git",
		".hg",
		"CVS",
		"node_modules",
		".sass-cache",
		".codekit-cache",
		".phpintel",
		"_minted-*",
		".ipynb_checkpoints"
	],
	"font_face": "Pragmata Pro",
	"font_options": "subpixel_antialias",
	"font_size": 14,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"ignored_packages":
	[
		"Markdown",
		"Vintage"
	],
	"match_brackets_content": false,
	"match_selection": false,
	"match_tags": false,
	"predawn_sidebar_arrows": true,
	"predawn_sidebar_large": false,
	"predawn_sidebar_medium": false,
	"predawn_sidebar_narrow": false,
	"predawn_sidebar_small": false,
	"predawn_sidebar_xlarge": false,
	"predawn_sidebar_xsmall": false,
	"predawn_tabs_active_underline": true,
	"predawn_tabs_large": false,
	"predawn_tabs_medium": false,
	"predawn_tabs_small": false,
	"preview_on_click": false,
	"rulers":
	[
		80
	],
	"scroll_speed": 5.0,
	"show_full_path": false,
	"tab_completion": false,
	"tab_size": 2,
	"theme": "predawn-DEV.sublime-theme",
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": true,
	"vintage_start_in_command_mode": true,
	"word_wrap": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment