Skip to content

Commit

Permalink
Added my-vimrc-mode.el
Browse files Browse the repository at this point in the history
  • Loading branch information
von committed Oct 24, 2012
1 parent 0478738 commit c7829ab
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions my-vimrc-mode.el
@@ -0,0 +1,19 @@
;;;
;;; Mode for Vim configuration files (e.g. ~/.vimrc)
;;;
;;; Kudos: http://stackoverflow.com/a/4238738/197789

(define-generic-mode 'vimrc-generic-mode
'()
'()
'(("^[\t ]*:?\\(!\\|ab\\|map\\|unmap\\)[^\r\n\"]*\"[^\r\n\"]*\\(\"[^\r\n\"]*\"[^\r\n\"]*\\)*$"
(0 font-lock-warning-face))
("\\(^\\|[\t ]\\)\\(\".*\\)$"
(2 font-lock-comment-face))
("\"\\([^\n\r\"\\]\\|\\.\\)*\""
(0 font-lock-string-face)))
'("/vimrc\\'" "\\.vim\\(rc\\)?\\'")
'((lambda ()
(modify-syntax-entry ?\" ".")))
"Generic mode for Vim configuration files.")

0 comments on commit c7829ab

Please sign in to comment.