Skip to content
Browse files

lua

  • Loading branch information...
1 parent 4684c2f commit b20f9a012bc6099a904949744f2e68e3dffe29bb @defunkt defunkt committed
Showing with 15 additions and 1 deletion.
  1. +15 −1 defunkt/lua.el
View
16 defunkt/lua.el
@@ -1,6 +1,20 @@
;; use an indentation width of two spaces
(setq lua-indent-level 2)
+(defun lua-insert-puts ()
+ (interactive)
+ (insert "puts()")
+ (backward-char))
+
+(defun lua-rake-run ()
+ (interactive)
+ (shell-command "rake run"))
+
+(add-hook 'lua-mode-hook
+ '(lambda ()
+ (define-key lua-mode-map (kbd "A-r") 'lua-rake-run)
+ (define-key lua-mode-map "\C-L" 'lua-insert-puts)))
+
;; Add dangling '(', remove '='
;; (setq lua-cont-eol-regexp
;; (eval-when-compile
@@ -30,4 +44,4 @@
;; (+ (current-indentation) (lua-calculate-indentation-right-shift-next))
;; 0))))
-;; (defun lua-calculate-indentation-right-shift-next (&optional parse-start)
+;; (defun lua-calculate-indentation-right-shift-next (&optional parse-start)

0 comments on commit b20f9a0

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