mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-12 08:24:18 +00:00
restructuring classic snippets dir to conform to new parenting specs
This commit is contained in:
13
snippets/ruby-mode/definitions/cls
Normal file
13
snippets/ruby-mode/definitions/cls
Normal file
@@ -0,0 +1,13 @@
|
||||
#name : class ... end
|
||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||
#group : definitions
|
||||
# --
|
||||
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
|
||||
Reference in New Issue
Block a user