Mercurial > hg > dotemacs
diff elpa/yasnippet-0.8.0/snippets/ruby-mode/definitions/cls @ 98:156cbb54f344
Add elpy and deps
author | Jordi GutiƩrrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 24 Oct 2014 09:44:33 -0400 (2014-10-24) |
parents | |
children |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/elpa/yasnippet-0.8.0/snippets/ruby-mode/definitions/cls @@ -0,0 +1,13 @@ +# name: class ... end +# contributor: hitesh <hitesh.jasani@gmail.com> +# key: cls +# -- +class ${1:`(let ((fn (capitalize (file-name-nondirectory + (file-name-sans-extension + (or (buffer-file-name) + (buffer-name (current-buffer)))))))) + (cond + ((string-match "_" fn) (replace-match "" nil nil fn)) + (t fn)))`} + $0 +end \ No newline at end of file