Created
December 12, 2011 22:05
-
-
Save bensie/1469346 to your computer and use it in GitHub Desktop.
Sublime Settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"font_size": 13.0, | |
"ensure_newline_at_eof_on_save": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Duplicate the current line | |
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
file = File.expand_path(ARGV[0] || (STDERR.puts('you must specify a ruby file'); exit(-1))) | |
dir = File.dirname file | |
while dir.size > 1 | |
if File.exist?(dir + '/.rvmrc') | |
exec("source \"$HOME/.rvm/scripts/rvm\"; cd #{dir}; ruby #{file}") | |
else | |
dir = dir.sub(/\/[^\/]*$/, '') | |
end | |
end | |
puts "Could not find any .rvmrc above #{file}" | |
exit -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/bin | |
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl | |
# To install “Package Control,” open Sublime and press Control + `. Next, paste the following snippet into the console. | |
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()) | |
# Packages to install | |
Alignment | |
CoffeeScript | |
RSpec | |
# Gemfile should always come up as Ruby | |
# edit ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.tmLanguage & add <string>Gemfile</string> under fileTypes | |
# Use RVM ruby when building | |
# Add rvm_ruby file to ~/bin/rvm_ruby and chmod +x ~/bin/rvm_ruby | |
# edit ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build to be: | |
{ | |
"cmd": ["/Users/$YOUR_USERNAME$/bin/rvm_ruby", "$file"], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": "source.ruby" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment