Skip to main content

Perfection with Sublime Text - Part 2

Installing Sublime Text

For Linux

Linux 32-bit -:

Linux 64-bit -:

Customizing on Linux - Desktop Entry and Symbolic Link

Linux Users should do the following to take advantage of Sublime Text by doing the next steps -:

For Mac Users, after downloading Sublime Text, all you will need is to create a symlink so that you can use sublime from the terminal

The last command will open a file called sublime.desktop in sublime, where you need to paste the following

For Mac OSX

Users should  download the latest package from here -: Sublime Text 2 - Download Open the .dmg file, and then drag the Sublime Text 2 bundle into the Applications folder.

For Windows

Users should download the latest package from here depending on your operating system (32 or 64 bit) -: Sublime Text 2 - Download. Doubleclick on the installer and follow the onscreen instructions.

Mac and Window Users, if you have further queries check this doc out -: Sublime Text Install Doc

Now this is the basic step. But to be super efficient, this is nowhere enough.

Installing Sublime Text Package Manager

Open Sublime Text Editor. Go to View -> Show Console

On Sublime Text 3, now paste the following code in the console

On Sublime Text 2, paste this code in the console

What does this awesome package manager for you? It basically makes package installations a breeze

We can use Sublime’s command palette by accessing the Tools menu, or by pressing Shift + Command + P, on the Mac or Ctrl + Shift + P for Linux and Windows Users. Whether you need to visit a Preferences page, or paste in a snippet, all of that can be accomplished here. It also opens up a list of commands available to the user. Any library that you install will immediately add new commands here.

To install plugins use the following process:

SUPER + SHIFT + P (SUPER = CMD on mac or CTRL on other operating systems) In the dialogue that pops up, type pi followed by the Enter/Return key to select Package Control: Install Package Now type the package install shortcut listed and hit the Enter/Return key again
 

So click Ctrl + Shift + P, and Type in install, which fuzzy searching enables the closest option Package Control : Install Package.

Now through this you can directly install the libraries you need just by searching for what you need.

Sublime Packages you must install -:

But some of these will need extra configuration. Do note that all these have to go in Preferences->Package Settings -> Select Package -> User Settings . Anything saved in Default Settings will be reset.

where USERNAME is your github username 

OR

Log into github 

Account Settings -> Applications ""Create New Token"" under ""Personal API Access Tokens"" You might want to give the Token a useful name

Edit the settings file (it should open automatically the first time you use a Gist command done through Ctrl + Shift + P) to specify token.

You must enter your GitHub token here

Shortcuts to increase efficiency

Customizing basic settings

Nowdays I am working in Drupal, so I have shown these settings for Drupal Coding standards. A quick Google Search will give you Sublime Text 2 settings for Ruby on Rails, Wordpress, Java or any other language you may be working on. Lets set the encoding, tab size, ruler line, etc right now so that our code will meet the Drupal Coding standards. Paste the following between the squigly brackets in "Settings - User" which you can access from the Preferences menu, you need to add a comma between this and any existing rules but make sure there isn't a comma on the last line:

We'd love to talk about your business objectives

Written by