Skip to content

Instantly share code, notes, and snippets.

@dholdren
Created July 10, 2014 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dholdren/6320b330bf7b7b649ed4 to your computer and use it in GitHub Desktop.
Save dholdren/6320b330bf7b7b649ed4 to your computer and use it in GitHub Desktop.
xmpfilter in sublime
#xmpfilter in Sublime Text 2
#Install "Ruby Markers" sublime plugin
#also "gem install rcodetools" (includes xmpfilter)
#Preferences->Package Settings->Ruby Markers->Settings User:
#{
# "check_for_rvm": true,
# "strip_stdout": true
#}
#To evaluate:
#Alt-Shift-u
1 + 2 # => 3
def fib(n)
n < 2 ? n : fib(n-1) + fib(n-2)
end
fib(10) # => 55
fib(24) # => 46368
10.times { |i| puts "Hello, World! #{i}" }
# >> Hello, World! 0
# >> Hello, World! 1
# >> Hello, World! 2
# >> Hello, World! 3
# >> Hello, World! 4
# >> Hello, World! 5
# >> Hello, World! 6
# >> Hello, World! 7
# >> Hello, World! 8
# >> Hello, World! 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment