Created
August 20, 2012 21:56
-
-
Save EchoAbstract/3408285 to your computer and use it in GitHub Desktop.
Some notes from init.el
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
| ; Syntax checking | |
| (add-to-list 'load-path "~/Emacs/lintnode") | |
| (require 'flymake-jslint) | |
| ;; Make sure we can find the lintnode executable | |
| (setq lintnode-location "~/Emacs/lintnode") | |
| ;; JSLint can be... opinionated | |
| (setq lintnode-jslint-excludes (list 'nomen 'plusplus 'onevar 'white)) | |
| ;; Start the server when we first open a js file and start checking | |
| (add-hook 'js-mode-hook | |
| (lambda () | |
| (lintnode-hook))) | |
| ; Same deal for coffeescript | |
| ;; make coffeelinenode work nicely! | |
| (add-to-list 'load-path "~/Emacs/coffeelintnode") | |
| (require 'flymake-coffeelint) | |
| ;; Make sure we can find the lintnode executable | |
| (setq coffeelintnode-location "~/Emacs/coffeelintnode") | |
| ;(setq coffeelintnode-node-program "path-to-node-executable") | |
| (setq coffeelintnode-coffeelint-excludes (list 'max_line_length)) | |
| (setq coffeelintnode-coffeelint-set "") | |
| ;; Start the server when we first open a coffee file and start checking | |
| (setq coffeelintnode-autostart 'true) | |
| (add-hook 'coffee-mode-hook | |
| (lambda () | |
| (coffeelintnode-hook) | |
| (unless (eq buffer-file-name nil) (flymake-mode 1)) ;dont invoke flymake on temporary buffers for the interpreter | |
| )) | |
| ;; Javascript repl | |
| (require 'js-comint) | |
| (setq inferior-js-program-command "node") | |
| (setq inferior-js-mode-hook | |
| (lambda () | |
| ;; We like nice colors | |
| (ansi-color-for-comint-mode-on) | |
| ;; Deal with some prompt nonsense | |
| (add-to-list 'comint-preoutput-filter-functions | |
| (lambda (output) | |
| (replace-regexp-in-string ".*1G\.\.\..*5G" "...")) | |
| (replace-regexp-in-string ".*1G.*3G" ">" output)))) | |
| (defun update-exec-path () | |
| "Updates `exec-path' with the contents of the PATH environment variable." | |
| (setq exec-path | |
| (let ((old-path exec-path) | |
| (new-path (split-string (getenv "PATH") ":"))) | |
| (delete-dups (append new-path old-path))))) | |
| ;; read in PATH from .bashrc on OS-X | |
| (if (and | |
| (not (getenv "TERM_PROGRAM")) | |
| (string-equal "darwin" (symbol-name system-type))) | |
| (progn | |
| (setenv "PATH" | |
| (shell-command-to-string "source $HOME/.bashrc && printf $PATH")) | |
| (update-exec-path))) | |
| ; Needed for emacs 24 | |
| (custom-set-variables | |
| ;; custom-set-variables was added by Custom. | |
| ;; If you edit it by hand, you could mess it up, so be careful. | |
| ;; Your init file should contain only one such instance. | |
| ;; If there is more than one, they won't work right. | |
| '(coffee-tab-width 2) | |
| '(coffee-command "cofee")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment