Skip to content

Instantly share code, notes, and snippets.

@wang-zhijun
Last active March 16, 2016 13:42
Show Gist options
  • Save wang-zhijun/7cfd3beb5099efb3881d to your computer and use it in GitHub Desktop.
Save wang-zhijun/7cfd3beb5099efb3881d to your computer and use it in GitHub Desktop.
Emacsにerlang-modeを使う方法

EmacsとErlangがインストールされています。

$HOME.emacsファイルが作成して、下のようなコードを入れます。

(setq load-path (cons "/usr/local/Cellar/erlang/17.1/lib/erlang/lib/tools-2.6.15/emacs" load-path))
(setq erlang-root-dir "/usr/local/Cellar/erlang/17.1/lib/erlang/lib/")
(setq exec-path (cons "/usr/local/Cellar/erlang/17.1/lib/erlang/bin/" exec-path))
(require 'erlang-start)

試しに erlファイルを開いて、C-c C-kでコンパイル

関数実行後Erlangのshellにinit:stop().を入力して、C-x k Enterで終了

そして C-x oでwindowの切り替え

C-x 0はカレントウィンドウを閉じる

C-x 1は自分以外のウインドウを閉じる

C-/でUndo

Esc-x linum-modeで行番号を表示、もう一度入力して、消す

C-spaceでMarkして、カーソルを移動して、矩形選択して、backspaceで消す

distelデフォルトでは/usr/local/share/distel/elispにインストールされる

$ git clone https://github.com/massemanet/distel.git
$ cd distel
$ make -e install

Esc-.で関数定義に飛ぶ、

Esc-,で呼び出し元に戻る

Esc ! EmacsからShellコマンドを入力できるように

C-k 1行をカーソルから末尾まで削除

Esc shift . 最後の行にいく

Esc shift , 最初の行にいく

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment