(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
(eval-after-load 'js2-mode '(progn
(require 'js-beautify)
(add-to-list 'load-path "~/.emacs.d/jquery-doc.el")
(require 'jquery-doc)
(require 'flymake-jshint)
(add-hook 'js2-mode-hook '(lambda ()
(flymake-mode 1)
(jquery-doc-setup)
(local-set-key "\M-t" 'js-beautify)
(define-key js2-mode-map [(shift f10)] (lambda()(interactive)(jslint-thisfile)))))
(eval-after-load 'js2-mode
'(progn
(define-key js2-mode-map (kbd "TAB") (lambda()
(interactive)
(let ((yas/fallback-behavior 'return-nil))
(unless (yas/expand)
(indent-for-tab-command)
(if (looking-back "^\s*")
(back-to-indentation))))))))
;; javascript lint
(defun jslint-thisfile ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))
(require 'js-comint)
;; Use node as our repl
(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))))))
))
(provide 'rgr-javascript)
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Tuesday, June 4, 2013
emacs javasscript
Saturday, December 11, 2010
Friday, December 10, 2010
Added javascript toggle for the edit/create even dialog.
Javascript can be used to access document elements by ID on the client. In this
case we can toggle the visibility of the #editeventform using the css display
property.
http://rileyrg.imgur.com/pub_web_software/NQnSu
--
My Emacs Files At GitHub
Labels:
editeventform,
elisp,
emacs,
javascript,
repost,
webs
Subscribe to:
Posts (Atom)