How to install Sublime Text 3
Looks like this is always a bitch to put together, so I might as well write it down in anticipation of a new computer.
I use this guide, I think, as the rest I can find want me to just install the .deb file which doesn't include opening the folders via right click:
http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/getting_started/install.html
Don't forget to check the md5 sum when downloaded from different locations, I downloaded it from both my local machine and my butt. Hopefully if there's a man in the middle of both locations, they're not tampering with my lowly data.
To start, get the wget (I'm making up the build number, reference the site for the latest)
~$: cd ~ ~$: wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2 ~$: tar vxjf sublime_text_3_build_3047_x64.tar.bz2
Now we should move the uncompressed files to an appropriate location.
sudo mv sublime_text_3 /opt/
Lastly, we create a symbolic link to use at the command line.
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime
In Ubuntu, if you also want to add Sublime Text to the Unity luncher, read on.
First we need to create a new file.
sudo sublime /usr/share/applications/sublime.desktop
Then copy the following into it.
Exec=sublime Terminal=false Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=sublime -n TargetEnvironment=Unity
If you’ve registered your copy of Sublime Text, but every time you open it you’re asked to enter your license, you should try running this command.
sudo chown -R username:username /home/username/.config /sublime-text-3
Just replace username with your account’s username. This should fix the permission error in the case that you opened up Sublime Text as root when you first entered the license.
The docs say to use this link, but in it looks like you just throw this crap into sublime's console (which is accessed through ctrl + `):
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Found docs here, which say to do this:
- Install SublimeLinter via sublime package control (Ctrl+Shift+PInstall > SublimeLinter) and restart Sublime
- Install pep8 through python3's pip (~$: [sudo] pip-3.x install pep8)
- Install SublimeLinter-pep8 via subilme package control (Ctrl+Shift+PInstall > SublimeLinter) and restart Sublime