Skip to content
Browse files

updated broken cls snippet

  • Loading branch information...
1 parent 3a87779 commit 627330b57144b1281df658af0251b50a0f0bb016 @bmaland committed
Showing with 10 additions and 17 deletions.
  1. +0 −14 class
  2. +10 −3 cls
View
14 class
@@ -1,14 +0,0 @@
-#name : class ... end
-#contributor : hitesh <hitesh.jasani@gmail.com>
-#group : definitions
-# key: class
-# --
-class ${1:$
- (let ((fn (capitalize (file-name-nondirectory
- (file-name-sans-extension
- (buffer-file-name))))))
- (cond
- ((string-match "_" fn) (replace-match "" nil nil fn))
- (t fn)))}
- $0
-end
View
13 cls
@@ -1,6 +1,13 @@
-#name : class ... end
+# name: class ... end
+# contributor: hitesh <hitesh.jasani@gmail.com>
# key: cls
# --
-class ${Name}
+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
+end

0 comments on commit 627330b

Please sign in to comment.
Something went wrong with that request. Please try again.