Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
393 B

  1. # name: class ... end
  2. # contributor: hitesh <hitesh.jasani@gmail.com>
  3. # key: cls
  4. # --
  5. class ${1:`(let ((fn (capitalize (file-name-nondirectory
  6. (file-name-sans-extension
  7. (or (buffer-file-name)
  8. (buffer-name (current-buffer))))))))
  9. (cond
  10. ((string-match "_" fn) (replace-match "" nil nil fn))
  11. (t fn)))`}
  12. $0
  13. end