Created
August 13, 2019 21:40
-
-
Save lacostenycoder/959d396f67f3572c3dc4f967cad086ee to your computer and use it in GitHub Desktop.
Add ruby benchmark snippet to atom editor
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
# ~/.atom/snippets.cson | |
".source.ruby": | |
"Initialize": | |
prefix: "Benchmark" | |
body: "Benchmark.bm do |x|\n x.report(:a) {\t$1}\n x.report(:b) {\t$2}\nend" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like to use Benchmark, but oddly forget this simple format because I don't use it enough. Now I don't have to look up docs anymore, I can just type
Bench
and tab autocomplete gives me the structure. This should be in atom core IMHO.