Wednesday, October 5, 2011

jshint-mode

Playing with javascript lately I came across a super utility called jshint : and Dale Harvey has produced a super jshint-mode! For a javascript nOOb like me it's invaluable when combined with jslint.

See : jshint and Javascript Lint

My javascript set up:-


(require 'js-beautify)

(add-to-list 'load-path "~/.emacs.d/jquery-doc")
(require 'jquery-doc)
(add-hook 'js2-mode-hook 'jquery-doc-setup)
(require 'flymake-jshint)
(add-hook 'js2-mode-hook
(lambda () (flymake-mode t)))

(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-hook 'js2-mode-hook '(lambda () (js-beautify)(define-key js2-mode-map (kbd "M-t") (lambda()(interactive)(js-beautify)))(define-key js2-mode-map [(shift f10)] (lambda()(interactive)(jslint-thisfile)))))

;; javascript lint
(defun jslint-thisfile ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))
(defun jslint-thisfile-test ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))

(provide 'rgr-javascript)

Tuesday, September 14, 2010

Browser shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-get-tags)
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub