mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-15 22:13:04 +00:00
12 lines
397 B
Plaintext
12 lines
397 B
Plaintext
# -*- mode: snippet -*-
|
|
# key: begin
|
|
# contributor: Translated from TextMate Snippet
|
|
# name: begin … rescue … end
|
|
# binding: "^W"
|
|
# --
|
|
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin
|
|
${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}}
|
|
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:Exception}${2/.+/ => /}${2:e}
|
|
${TM_SELECTED_TEXT/([\t ]*).*/$1/m} $0
|
|
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end
|