Sublime
Installation
We can download it directly from their web
_$: mkdir -p /home/<user>/apps
_$: cp sublime_text_3_build_3059_x64.tar.bz2 /home/<user>/apps
_$: cd /home/<user>/apps
_$: tar xvfj sublime_text_3_build_3059_x64.tar.bz2
_$: sudo ln -s /home/<user>/apps/sublime_text_3/sublime_text /usr/bin/sublime3
If we had already installed an older version (sublime 2), there is no need to worry: the configuration files for Sublime 3 will be created in /home/<user>/.config/sublime-text-3
.
Desktop launcher
To create a desktop launcher, select the Create a custom application launcher
option and fill in the values:
- Type:
Application
- Name:
Sublime Text3
- Command:
/usr/bin/sublime3
- Icon:
/home/<user>/apps/sublime_text_3/Icon/256x256/sublime-text.png
Run from command line
If we run sublime from the command line it might give GLib-CRITICAL errors. To ignore them we can redirect stderr
and stdout
to /dev/null
:
_$: sublime fichero.txt &> /dev/null &
Comment out code blocks
Go to Preferences
-> Key Bindings - User
and add the following lines:
[
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } },
]
A theme for Sublime
A good theme for Sublime that gets Python syntax right is Afterglow. It is easy to install using the Sublime’s Package Control tool:
- Open
Command Palette
(underTools
or usingCtrl
+Shift
+P
) - Type
Package Control: Install Package
- Search
Theme - Afterglow
Create an alias
If you find yourself opening sublime from the command line, you can create an alias in /home/user/.bashrc
.
/home/user/.bashrc
------------------
...
alias sbl='sublime'
...