Skip to content

Commit

Permalink
dired-single settings, flymake and flymake-tuareg, flymake-jslint
Browse files Browse the repository at this point in the history
  • Loading branch information
leoncamel committed Oct 19, 2012
1 parent 0d4418c commit c9612ce
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
26 changes: 18 additions & 8 deletions site-start.d/init_dired.el
Expand Up @@ -30,9 +30,6 @@

(setq ls-lisp-dirs-first t)

;; use single dired buffer
(require 'dired-single)

;; TODO : when refersh(press 'g' in dired,
;; it require flymake-mode, pretty wired.
(require 'flymake)
Expand Down Expand Up @@ -67,13 +64,26 @@ Works in Microsoft Windows, Mac OS X, Linux."
(defun my-dired-init ()
"Bunch of stuff to run for dired, either immediately or when it's
loaded."
(require 'dired-single)
;; <add other stuff here>
(define-key dired-mode-map [return] 'dired-single-buffer)
(define-key dired-mode-map [mouse-1] 'dired-single-buffer-mouse)
(define-key dired-mode-map "^"
;; original single-buffer
(when (fboundp 'dired-single-buffer)
(define-key dired-mode-map [return] 'dired-single-buffer)
(define-key dired-mode-map "^"
(function
(lambda nil (interactive) (dired-single-buffer "..")))))
(when (fboundp 'dired-single-buffer-mouse)
(define-key dired-mode-map [mouse-1] 'dired-single-buffer-mouse))

;; joc single-buffer
(when (fboundp 'joc-dired-single-buffer)
(define-key dired-mode-map [return] 'joc-dired-single-buffer)
(define-key dired-mode-map "^"
(function
(lambda nil (interactive) (dired-single-buffer ".."))))

(lambda nil (interactive) (joc-dired-single-buffer "..")))))
(when (fboundp 'joc-dired-single-buffer-mouse)
(define-key dired-mode-map [mouse-1] 'joc-dired-single-buffer-mouse))

;; allow dired to be able to delete or copy a whole dir.
;; “always” means no asking. “top” means ask once. Any other symbol means ask each and every time for a dir and subdir.
(setq dired-recursive-copies (quote always))
Expand Down
5 changes: 5 additions & 0 deletions site-start.d/init_ocaml.el
Expand Up @@ -24,6 +24,11 @@

;;; Code:

;; flymake-tuareg
(require 'flymake-tuareg)
(add-hook 'tuareg-mode-hook 'flymake-tuareg-load)

;; utop-mode
(when (executable-find "utop")
(add-to-list 'load-path (my-dotfile-vendor "utop"))

Expand Down
11 changes: 10 additions & 1 deletion site-start.d/init_packages.el
Expand Up @@ -62,8 +62,11 @@
marmalade
oddmuse
scala-mode

;;;;;;;;;;;;;;;;;;;;
;; Web Dev
js2-mode

;;;;;;;;;;;;;;;;;;;;
;; latex
auctex
Expand All @@ -89,6 +92,12 @@
;;;;;;;;;;;;;;;;;;;;
;; Auto-complete
auto-complete

;;;;;;;;;;;;;;;;;;;;
;; Flymake
flymake
flymake-jslint
flymake-tuareg

;;;;;;;;;;;;;;;;;;;;
;; Text Editing
Expand Down
3 changes: 3 additions & 0 deletions site-start.d/init_web.el
Expand Up @@ -39,5 +39,8 @@
(autoload 'js2-mode "js2-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;; flymake-jslint
(add-hook 'js-mode-hook 'flymake-jslint-load)

(provide 'init_web)
;;; init_html.el ends here

0 comments on commit c9612ce

Please sign in to comment.