LoginSignup
3
2

More than 5 years have passed since last update.

Macでtuaregを導入する

Last updated at Posted at 2016-10-20

tuaregはEmacsでOCamlを快適に使うためのモードを提供するものです。

事前準備

  1. Homebrewを導入する。
  2. Emacsを導入する。(Homebrewで入れられます)

導入手順

  1. OPAM (OCaml Package Manager)を導入する。
  2. tuaregを導入する。
$ brew install opam
$ opam init
$ opam update
$ opam upgrade
$ opam install tuareg
$ echo '(load "'"$HOME"'/.opam/system/share/emacs/site-lisp/tuareg-site-file")' >> ~/.emacs

以下を追記

~/.emacs
(add-to-list 'auto-mode-alist '("\\.ml[iylp]?$" . tuareg-mode))
(autoload 'tuareg-mode "tuareg" "Major mode for editing OCaml code." t)
(autoload 'tuareg-run-ocaml "tuareg" "Run an inferior OCaml process." t)
(autoload 'ocamldebug "ocamldebug" "Run the OCaml debugger." t)

動作確認

$ emacs sample.ml

modeが(Tuareg)になっていたらOK。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2