Sublime Text

From Dev Wiki
Revision as of 22:58, 25 April 2022 by Brodriguez (talk | contribs) (Update base settings)
Jump to navigation Jump to search

Sublime Text is a universal text editor that's very useful for coding. It's kind of like notepad++, except it exists for essentially all OS types, and is much more customizable.
It also has support for various extensions, which can make it almost as good as an IDE for most languages.

Ubuntu Installation

Open a terminal and run the following commands:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text

Baseline Settings

The following settings are a good default to get started. Simply copy into your settings window.

{
    "caret_style": "phase",
    "default_line_ending": "unix",
    "ensure_newline_at_eof_on_save": true,
    "font_size": 12,
    "ignored_packages":
    [
        "Vintage"
    ],
    "line_padding_bottom": 2,
    "line_padding_top": 2,
    "rulers": [120],
    "save_on_focus_lost": true,
    "scroll_past_end": true,
    "shift_tab_unindent": true,
    "theme": "Adaptive.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
}


Installing Packages

First, install sublime text Package Control as indicated at https://packagecontrol.io/installation.
Then, you can use Package Control: Install Package to add packages as desired.

Some useful packages are listed below.

Dayle Rees Color Schemes

A whole set of various, well made color schemes for sublime text.

Personal Favorites:

  • Glowfish
  • Iceberg
  • Snappy Light

Editor Config

Allows sublime to take advantage of editorconfig files.
See https://git.brandon-rodriguez.com/other/editorconfig and https://editorconfig.org/ for more info.