itang / todo.itang.me

4 stars 2 forks source link

将Emacs捡起来 #53

Closed itang closed 10 years ago

itang commented 10 years ago
$ emacs
  M x package-refresh-contents
  M x package-install (enter) cider (enter)

打开clojure 等模块

$ cp ~/.emacs.d/sample/prelude-modules.el ~/.emacs.d/
$ emacs ~/.emacs/prelude-modules.el
;;; start
;;(require 'prelude-erc)
(require 'prelude-ido) ;; Super charges Emacs completion for C-x C-f and more
;; (require 'prelude-helm) ;; Interface for narrowing and search
;;(require 'prelude-company)
(require 'prelude-key-chord) ;; Binds useful features to key combinations
;; (require 'prelude-mediawiki)
;; (require 'prelude-evil)

;;; Programming languages support
(require 'prelude-c)
(require 'prelude-clojure)
;; (require 'prelude-coffee)
;; (require 'prelude-common-lisp)
(require 'prelude-css)
;;(require 'prelude-emacs-lisp)
;;(require 'prelude-erlang)
(require 'prelude-go)
;; (require 'prelude-haskell)
(require 'prelude-js)
;; (require 'prelude-latex)
;; (require 'prelude-lisp)
;; (require 'prelude-ocaml)
(require 'prelude-org) ;; Org-mode helps you keep TODO lists, notes and more
;; (require 'prelude-perl)
;; (require 'prelude-python)
(require 'prelude-ruby)
(require 'prelude-scala)
;; (require 'prelude-scheme)
(require 'prelude-shell)
;; (require 'prelude-scss)
(require 'prelude-web) ;; Emacs mode for web templates
(require 'prelude-xml)
;;; end

安装lein cider-nrepl 插件

编辑 ~/.lein/profiles.clj

{:user {:plugins [[lein-try "0.4.3"]
                          [cider/cider-nrepl "0.8.0-SNAPSHOT"]]}}

进入lein 项目

$  emacs project.clj
> M x cider-jack-in 

看文档https://github.com/clojure-emacs/cider 熟悉快捷键和用法