понедельник, 1 сентября 2014 г.

Go to sublime 3


  1.  Install sublime 3: http://www.sublimetext.com/3
  2.  Add alias to run from terminal: http://crabonature.pl/posts/20-sublime-text-3-on-os-x-terminal

Show opened file in sidebar:

Maybe this will help, simple plugin:

goto Sublime package folder, make dir "Project Side Bar", in this folder make a file "Project Side Bar.py" put code below:
CODE: SELECT ALL
import sublime
import sublime_plugin

class SideBarListener(sublime_plugin.EventListener):
    
    def on_activated(self, view):
        view.window().run_command('reveal_in_side_bar')

Save and it's done, rest will be done out of box ;)

Cucumber run

.../Sublime Text 3/Packages/User/RubyTest.sublime-settings

{
  "check_for_rvm": true,
  "save_on_run": true,
  "run_cucumber_command": "bundle exec cucumber -rfeatures {relative_path}",
  "run_single_cucumber_command": "bundle exec cucumber -rfeatures {relative_path} -l{line_number}",

  "run_rspec_command": "bundle exec rspec {relative_path}",
  "run_single_rspec_command": "bundle exec rspec {relative_path}:{line_number}"
}

Switch between code and spec

{ "keys": ["super+period"],
      "command": "switch_between_code_and_test",
      "args": {"split_view": false},
      "context": [ { "key": "selector", "operator": "equal",
                   "operand": "source.ruby, source.rspec, text.gherkin.feature"
               } ]
  }

Delete trailing spaces

{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }

Overriding default snippets
http://maximilianhoffmann.com/posts/configuring-sublime-text-3