mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Update mod ruby snippet
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# name: module ... end
|
||||
# contributor: hitesh <hitesh.jasani@gmail.com>
|
||||
# contributor: hitesh <hitesh.jasani@gmail.com>, jimeh <contact@jimeh.me>
|
||||
# key: mod
|
||||
# --
|
||||
module ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||
(file-name-sans-extension
|
||||
(or (buffer-file-name)
|
||||
(buffer-name (current-buffer))))))))
|
||||
(or (buffer-file-name)
|
||||
(buffer-name (current-buffer))))))))
|
||||
(cond
|
||||
((string-match "_" fn) (replace-match "" nil nil fn))
|
||||
(t fn)))`}
|
||||
|
||||
Reference in New Issue
Block a user