Created
December 9, 2008 09:14
-
-
Save kawaguchi/33848 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
;; js2-mode | |
(when (load "js2") | |
(setq js2-cleanup-whitespace nil | |
js2-mirror-mode nil | |
js2-bounce-indent-flag nil) | |
(defun indent-and-back-to-indentation () | |
(interactive) | |
(indent-for-tab-command) | |
(let ((point-of-indentation | |
(save-excursion | |
(back-to-indentation) | |
(point)))) | |
(skip-chars-forward "\s\t" point-of-indentation))) | |
(define-key js2-mode-map (kbd "C-i") 'indent-and-back-to-indentation) | |
(define-key js2-mode-map (kbd "C-m") nil) | |
(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