Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
流浪者/Clojure/Emacs_Emacs_Clojure_Vagrant - Fatal编程技术网

流浪者/Clojure/Emacs

流浪者/Clojure/Emacs,emacs,clojure,vagrant,Emacs,Clojure,Vagrant,我想为使用Emacs探索Clojure建立一个标准环境。有人有适合这个的食谱吗?我正在考虑一个运行Ubuntu风格的流浪系统,它带有NREPL和一些有用的EMACS支持插件 vagrant box add preciseMinimal http://goo.gl/wxdwM 更改为Clojure vagrant基本文件夹 vagrant init preciseMinimal vagrant up vagrant ssh 或ssh到127.0.0.1端口2222(或“vagrant up”

我想为使用Emacs探索Clojure建立一个标准环境。有人有适合这个的食谱吗?我正在考虑一个运行Ubuntu风格的流浪系统,它带有NREPL和一些有用的EMACS支持插件

vagrant box add preciseMinimal http://goo.gl/wxdwM
更改为Clojure vagrant基本文件夹

vagrant init preciseMinimal
vagrant up

vagrant ssh
或ssh到127.0.0.1端口2222(或“vagrant up”输出中提到的其他端口)

退出并重新连接到ssh

cd ~/bin
wget https://raw.github.com/technomancy/leiningen/preview/bin/lein
chmod +x lein
./lein


cd ~
cat >.emacs
; Package.el customization
(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)

;; install packages
(defvar my-packages '(
  auto-complete
  clojure-mode
  clojure-test-mode
  nrepl
  ac-nrepl
  paredit
  rainbow-delimiters
))

(dolist (p my-packages)
  (when (not (package-installed-p p))
  (package-refresh-contents)
    (package-install p)))
;; The following line can be removed after first install to speed up startup
(byte-recompile-directory (expand-file-name "~/.emacs.d") 0)

(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.
 '(auto-save-default nil)
 '(backup-inhibited t t)
 '(cursor-type 'bar t)
 '(column-number-mode t)
 '(delete-selection-mode t)
 '(inhibit-startup-screen t)
 '(initial-scratch-message nil)
 '(tool-bar-mode nil)
 '(xterm-mouse-mode 1))

;; rainbow delimiters
(require 'rainbow-delimiters)
(global-rainbow-delimiters-mode)

;; paredit
(add-hook 'clojure-mode-hook 'paredit-mode)
(add-hook 'nrepl-mode-hook 'paredit-mode)
(global-set-key [f7] 'paredit-mode)

;; clojure-mode
(global-set-key [f9] 'nrepl-jack-in)

;; nrepl
(add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)
(setq nrepl-popup-stacktraces nil)
(add-to-list 'same-window-buffer-names "*nrepl*")
(add-hook 'nrepl-mode-hook 'paredit-mode)

;; Auto complete
(require 'auto-complete-config)
(ac-config-default)
(define-key ac-completing-map "\M-/" 'ac-stop)

;; ac-nrepl
(require 'ac-nrepl)
(add-hook 'nrepl-mode-hook 'ac-nrepl-setup)
(add-hook 'nrepl-interaction-mode-hook 'ac-nrepl-setup)
(eval-after-load "auto-complete" '(add-to-list 'ac-modes 'nrepl-mode))
#CTRL-D to finish
感激的归因:

一个由Github托管、由shell提供的vagrant安装程序位于以下位置:

所有这些都需要结帐和流浪汉的帮助

一旦虚拟机启动,ssh就可以安装到机器上。 运行emacs以完成安装。
然后,M-x苹果酒插孔

paredit
可能会对新的Emacs用户产生轻微的干扰。如果你坚持下去,你未来的自己将永远感激。是否可以使用Chef来安装软件包,或者上传.emacs?一个有趣的项目是将所有这些都打包到一个Vagrant/puppet配置中,这样就只需要从GitHub结帐和“Vagrant up”了。请看@event_jr我启动这个项目是为了提供一个学习的基础Clojure,特别是在emacs平台上。我会接受你的建议,只是一个建议。退房这家伙为Emacs创建了一个非常棒的设置。你把所有东西都收拾好准备出发。
cd ~/bin
wget https://raw.github.com/technomancy/leiningen/preview/bin/lein
chmod +x lein
./lein


cd ~
cat >.emacs
; Package.el customization
(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)

;; install packages
(defvar my-packages '(
  auto-complete
  clojure-mode
  clojure-test-mode
  nrepl
  ac-nrepl
  paredit
  rainbow-delimiters
))

(dolist (p my-packages)
  (when (not (package-installed-p p))
  (package-refresh-contents)
    (package-install p)))
;; The following line can be removed after first install to speed up startup
(byte-recompile-directory (expand-file-name "~/.emacs.d") 0)

(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.
 '(auto-save-default nil)
 '(backup-inhibited t t)
 '(cursor-type 'bar t)
 '(column-number-mode t)
 '(delete-selection-mode t)
 '(inhibit-startup-screen t)
 '(initial-scratch-message nil)
 '(tool-bar-mode nil)
 '(xterm-mouse-mode 1))

;; rainbow delimiters
(require 'rainbow-delimiters)
(global-rainbow-delimiters-mode)

;; paredit
(add-hook 'clojure-mode-hook 'paredit-mode)
(add-hook 'nrepl-mode-hook 'paredit-mode)
(global-set-key [f7] 'paredit-mode)

;; clojure-mode
(global-set-key [f9] 'nrepl-jack-in)

;; nrepl
(add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)
(setq nrepl-popup-stacktraces nil)
(add-to-list 'same-window-buffer-names "*nrepl*")
(add-hook 'nrepl-mode-hook 'paredit-mode)

;; Auto complete
(require 'auto-complete-config)
(ac-config-default)
(define-key ac-completing-map "\M-/" 'ac-stop)

;; ac-nrepl
(require 'ac-nrepl)
(add-hook 'nrepl-mode-hook 'ac-nrepl-setup)
(add-hook 'nrepl-interaction-mode-hook 'ac-nrepl-setup)
(eval-after-load "auto-complete" '(add-to-list 'ac-modes 'nrepl-mode))
#CTRL-D to finish