Skip to content

Instantly share code, notes, and snippets.

@jtpaasch
Last active February 16, 2022 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtpaasch/2f885ec7ed1afd2dc774b26fe6867859 to your computer and use it in GitHub Desktop.
Save jtpaasch/2f885ec7ed1afd2dc774b26fe6867859 to your computer and use it in GitHub Desktop.
Notes on setting up emacs/vim for OCaml

Setting up editors for OCaml

Setting up the package manager - emacs

Add this to .emacs:

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

Show trailing whitespace - emacs

Within emacs:

M-x set-variable (enter 'show-trailing-whitespace', then 't')

Or, in .emacs:

(setq-default show-trailing-whitespace t)

Show 80 character line - emacs

Within emacs:

M-x set-variable (then type 'display-fill-column-indicator-column', then '80')
M-x global-display-fill-column-indicator-mode

Or, in .emacs:

(setq-default display-fill-column-indicator-column 80)
(global-display-fill-column-indicator-mode)

MacOS (Big Sur) - emacs

To install Tuareg from within emacs. To check if the package is available:

C-h P (then type 'tuareg')

To install it:

M-x package-install (then type 'tuareg')

Then open an .ml or .mli file.

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