Sublime Text3 configuration ¶
Download setup from here:
http://www.sublimetext.com/3
Install Package Control manager as explained here:
https://packagecontrol.io/installation#st3
Enable execution from command line:
$ ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
To transfer your Sublime Text configuration to fellow user you only need to copy from "~/Library/Application Support/Sublime Text 3/":
- Packages/User/Preferences.sublime-settings for settings
- Packages/User/Package Control.sublime-settings for list of plugins
- eventually: a folder containing custom snippets
For personal backup purposes you can sync Sublime Text configuration using Dropbox; run the script setup.bash from Dropbox folder: /Users/morlandi/Dropbox/morlandi/__SUMBLIME_TEXT_3_CONFIG__
#!/bin/bash target_folder="/Users/morlandi/Dropbox/morlandi/__SUMBLIME_TEXT_3_CONFIG__" link_folder="/Users/morlandi/Library/Application Support/Sublime Text 3/Packages/User" for file in * do if [ -f "$file" ] && [ "$file" != "setup.bash" ]; then echo "link file: $file" ln -f -s "$target_folder/$file" "$link_folder/$file" fi if [ -d "$file" ]; then if ! [ -d "$link_folder/$file" ]; then echo "link folder: $file" ln -f -s "$target_folder/$file/" "$link_folder/$file" fi fi done
Sample User settings:
{
"rulers": [80],
"translate_tabs_to_spaces": true,
"draw_minimap_border": true,
"always_show_minimap_viewport": true,
"highlight_line": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true,
"ensure_newline_at_eof_on_save": true,
"bold_folder_labels": true,
"show_encoding": true,
"show_line_endings": true,
"index_files": false,
"ignored_packages": []
}
Sample list of plugins:
{
"in_process_packages":
[
],
"installed_dependencies":
[
"0_package_control_loader",
"bz2"
],
"installed_packages":
[
"Package Control",
"SublimeLinter"
]
}
PdbSublimeTextSupport
Create file "~/.pdbrc":
from PdbSublimeTextSupport import preloop, precmd import pdb pdb.Pdb.preloop = preloop pdb.Pdb.precmd = precmd
then install:
pip install PdbSublimeTextSupport
Changes to have it working on Windows
file "PdbSublimeTextSupport.py":
import os
import os.path
import subprocess, shlex
from os.path import exists
def launch(self):
frame, lineno = self.stack[self.curindex]
filename = self.canonic(frame.f_code.co_filename)
if exists(filename):
#command = 'subl -b "%s:%d"' % (filename, lineno)
#os.system(command)
command = r'"C:\Program Files\Sublime Text 3\sublime_text.exe" -b "%s:%d"' % (filename, lineno)
subprocess.run(shlex.split(command))
def preloop(self):
launch(self)
def precmd(self, line):
launch(self)
return line
or on Windows try pdbpp
with the following setting in the registry:
[HKEY_CURRENT_USER\Console] "VirtualTerminalLevel"=dword:00000001
References
Remote Collab for SublimeText
TODO: check these plugins
TODO: select which plugin to install
- Djaneiro
- Git
- GitGutter
- HighlightCurrentWord
- Language - Italian
- LiveCSS
- PackageControl
- RestructuredText Improved
- SFTP
- Shell Turtlestein
- SideBarEnhancements
- SublimeCodeIntel
- SublimeGit
- SublimeLinter
- SublimeREPL
- SyncedSideBar
