Skip to content

Latest commit

 

History

History
82 lines (53 loc) · 2.22 KB

sublime.md

File metadata and controls

82 lines (53 loc) · 2.22 KB

Install Sublime Text

Now it's time to install Sublime Text, a sophisticated text editor for code, markup, and prose.

To get started, download Sublime Text 2 and run the installer. Again, go with the default installation options if you're feeling overwhelmed.

Once installed, use the Start Menu to launch Sublime Text 2.

Next, navigate to the Preferences > Settings - User menu item.

Ensure the file contains the following preferences.

{
  "font_size": 15.0,
  "ensure_newline_at_eof_on_save": true,
  "rulers": [80],
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "trim_trailing_white_space_on_save": true
}

WARNING: Punctuation errors with either curly-brackets, double-quotes, colons, square-brackets, or commas will be highlighted in red. If one of these symbols is missing, Sublime Text will highlight the next closest symbol. Analyze the above example preferences carefully.

Remember to save the file. When you're done, close the file.

subl

You'll find it insanely useful to open files and directories into Sublime Text from the Terminal.

To get started, run the following commands.

#!/bin/sh
TARGET="/c/Program Files (x86)/Git/bin/subl"
echo '#!/bin/sh' > $TARGET
echo '"C:\Program Files\Sublime Text 2\sublime_text.exe" "$1" &' >> $TARGET

To verify Sublime Text is wired up correctly, run the following command.

subl ~/.bashrc

And Bash's startup file will open in Sublime Text.

Edit .bashrc

Many command line tools, like Git, use the EDITOR environment variable to open your preferred text editor.

While Bash's startup file is handy, add the following settings.

# Sublime Text
export EDITOR='subl -w'

Save the file.

Now, relaunch the Terminal and verify these settings with the following command.

echo $EDITOR

Inspect the PATH

Like most shells, Bash relies on the PATH environment variable to specify a set of directories where other commands can be found.

To see the contents of the PATH environment variable, run the following command.

echo $PATH

Fini!