bv7e9a
Last Updated: February 25, 2016
·
3.592K
· nekwebdev
C9a56d91119a96b8f5ef65e28161f4eb

Sublime Text 2 Linux tips!

If you missed it, this is a follow up on a tip on how to Build a web development OS in VirtualBox.

Download Sublime Text 2 and extract it:

tar -jxvf Sublime\ Text\ 2\version.tar.bz2

Just use what ever file name you downloaded then cd into the folder you downloaded and extracted into then:

sudo mv Sublime\ Text\ 2 sublime

sudo mv sublime /opt/

cd /opt

sudo chown -R root:root sublime

sudo chmod -R +r sublime

Create excecutable in the path:

sudo vim /usr/bin/sublime_text

You want this in it:

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export SUBLIME_HOME="/opt/sublime"

$SUBLIME_HOME/sublime_text "$*"

Then chmod it:

sudo chmod 775 /usr/bin/sublime_text

Create the desktop file to it shows in your menus:

sudo vim /usr/share/applications/sublime.desktop

And this goes in it:

[Desktop Entry]
Encoding=UTF-8
Name=Sublime Text
Comment=Sublime Text 2
Exec=sublime_text
Icon=/opt/sublime/Icon/256x256/sublime_text.png
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;TextEditor;
StartupNotify=true

If you now go in Menu>Accessories you will now see your Sublime Text 2 shortcut. This works on Linux Mint 14.1 and should work on other Debian/Ubuntu variants.

Now we want to move all of our settings to the Dropbox, delete them and create a symbolic link from the Dropbox back to their original location:

cd ~/.config
cp -R sublime-text-2/ ~/Dropbox/
rm -R sublime-text-2/
ln -s ~/Dropbox/sublime-text-2 sublime-text-2

Done, now all of your settings, themes and plugins will be saved in the could :)

Let's have a look at plugins, the first thing you will want is Sublime Package Control, you can find it here.

Now with just a Ctrl+Shift+P and typing illstan (Sublime Text 2 fuzzy searching is just awesome ^^) + hit enter you can type packages names to be installed! Quick and easy.

Try it by installing Emmet, the new ZenCoding plugin for Sublime Text 2.

Others worth installing:

  • AdvancedUserFileCreation

  • SideBarEnhancements

  • SublimeLinter

  • Gist

  • DocBlockr

  • PlainTasks

Look them up for what they do. Also think about snippets and syntax for all the languages you use often.

Say Thanks
Respond