Created
April 11, 2015 16:06
-
-
Save shigemk2/674926a5f692cc924b88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'js2-mode) | |
(add-hook 'js2-mode-hook 'ac-js2-mode) | |
(defun js2-mode-hooks () | |
(font-lock-add-keywords nil | |
'(("^[^\n]\\{80\\}\\(.*\\)$" 1 font-lock-warning-face t))) | |
(defun underscore-require () | |
(interactive) | |
(insert (format "var _ = require('underscore');")) | |
) | |
(local-set-key (kbd "C-x c j") 'underscore-require) | |
) | |
(add-hook 'js2-mode-hook 'js2-mode-hooks) | |
(custom-set-variables | |
'(js2-basic-offset 2) | |
) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment