Set indentation to 2
A great way to use Sublime as more of an IDE is to enabled the sidebar view, to drag the folder into the sidebar so you have a crude Finder/Explorer view and then to save as a project.
https://github.com/daaain/Handlebars
https://sublime.wbond.net/packages/MarkdownEditing
https://sublime.wbond.net/packages/HTML-CSS-JS%20Prettify
https://github.com/CraigWilliams/BeautifyRuby
https://github.com/maltize/sublime-text-2-ruby-tests
Sublime -> Preferences -> Package Settings -> RubyTest -> Settings (User/Default)
{
"check_for_rvm": true,
"check_for_bundler": true
}
Sublime -> Preferences -> Package Settings -> RubyTest -> Settings (User/Default)
https://github.com/maltize/sublime-text-2-ruby-tests/issues/188
{
"run_ruby_unit_command": "source /usr/local/opt/chruby/share/chruby/chruby.sh && chruby 2.1.6 && ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "source /usr/local/opt/chruby/share/chruby/chruby.sh && chruby 2.1.6 && ruby -Itest {relative_path} -n '{test_name}'",
"run_rspec_command": "source /usr/local/opt/chruby/share/chruby/chruby.sh && chruby 2.1.6 && rspec {relative_path}",
"run_single_rspec_command": "source /usr/local/opt/chruby/share/chruby/chruby.sh && chruby 2.1.6 && rspec {relative_path}:{line_number}",
}
These can be specified on a per-project basis now: https://github.com/maltize/sublime-text-2-ruby-tests/pull/239
For now, manually hacking up the env for docker.
{
"folders":
[
{
"path": "quiz_api"
}
],
"settings": {
"draw_white_space": "all",
"trim_trailing_white_space_on_save": true,
"run_rspec_command": "export DOCKER_HOST=tcp://192.168.99.100:2376 && export DOCKER_CERT_PATH=/Users/cwang/.docker/machine/machines/dinghy && export DOCKER_TLS_VERIFY=1 && export DOCKER_MACHINE_NAME=dinghy && /usr/local/bin/docker-compose run --rm web bundle exec rspec {relative_path}",
"run_single_rspec_command": "export DOCKER_HOST=tcp://192.168.99.100:2376 && export DOCKER_CERT_PATH=/Users/cwang/.docker/machine/machines/dinghy && export DOCKER_TLS_VERIFY=1 && export DOCKER_MACHINE_NAME=dinghy && /usr/local/bin/docker-compose run --rm web bundle exec rspec {relative_path}:{line_number}",
}
}
https://github.com/sindresorhus/editorconfig-sublime
https://github.com/jisaacks/GitGutter
https://github.com/SublimeLinter/SublimeLinter3
npm install -g jshint
https://github.com/SublimeLinter/SublimeLinter-jshint
Provide a more intuitive approach for going through tabs. Similar to Notepad++ and Visual Studio.
https://github.com/travmik/ZenTabs
Provides functionality to copy as html/rtf. This is useful for me as a way to copy code and paste it into my notes program (currently OneNote).
https://github.com/n1k0/SublimeHighlight
To set the colors for different projects you can go to:
Project -> Edit Project
And add the settings json for color_scheme.
I recommend doing this when you have multiple projects that you may be working on. For me, I’ll do this when I have a predominantly Rails project and predominantly Node project that connect. It makes it much easier to context switch for me.
Example:
{
"folders":
[
{
"follow_symlinks": true,
// "folder_exclude_patterns": ["node_modules"] // for node projects
"path": "web"
}
],
"settings":
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"draw_white_space": "all",
"trim_trailing_white_space_on_save": true
}
}
Goto Anything
Use Goto Anything to open files with only a few keystrokes, and instantly jump to symbols, lines or words.
Triggered with ⌘P, it is possible to:
Type part of a file name to open it. Type @ to jump to symbols, # to search within the file, and : to go to a line number. These shortcuts can be combined, so tp@rf may take you to a function read_file within a file text_parser.py. Similarly, tp:100 would take you to line 100 of the same file.
Slightly modified from https://www.sublimetext.com/docs/3/osx_command_line.html to put the symlink in /usr/local/bin
instead of ~/bin
Previously, it was ok to use /usr/bin
but from El Capitan (rootless mode) that is no longer permitted. There are ways to disable it but it’s better to just use /usr/local/bin
now.
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl