Add ruby module snippet
This commit is contained in:
parent
d311cffd16
commit
216f9da807
1 changed files with 11 additions and 0 deletions
11
emacs/.emacs.d/snippets/ruby-mode/mod
Normal file
11
emacs/.emacs.d/snippets/ruby-mode/mod
Normal file
|
@ -0,0 +1,11 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: module ... end
|
||||
# key: mod
|
||||
# group: definitions
|
||||
# --
|
||||
module ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||
(directory-file-name
|
||||
default-directory)))))
|
||||
(replace-regexp-in-string "_" "" fn t t))`}
|
||||
$0
|
||||
end
|
Loading…
Reference in a new issue