lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Wrap-in-Begin-Rescue-End.sublime-snippet (439B)


      1 <snippet>
      2 	<content><![CDATA[${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin
      3 	${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}}
      4 ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:StandardError}${2/.+/ => /}${2:e}
      5 ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}	$0
      6 ${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end
      7 ]]></content>
      8 	<tabTrigger>begin</tabTrigger>
      9 	<scope>source.ruby - comment</scope>
     10 	<description>begin … rescue … end</description>
     11 </snippet>