ink-mode icon indicating copy to clipboard operation
ink-mode copied to clipboard

An Emacs major mode for the interactive fiction scripting language Ink, by Inkle Studios.

  • ink-mode [[https://melpa.org/#/ink-mode][file:https://melpa.org/packages/ink-mode-badge.svg]]

=ink-mode= is an Emacs major mode for [[https://www.inklestudios.com/ink/][Ink]], an open-source scripting language for writing interactive fiction developed by [[https://www.inklestudios.com/][Inkle Studios]].

** Features

  • syntax highlighting
  • automatic indentation
  • autocomplete divert links with =completion-at-point= (=M-<TAB>= or =C-M-i=)
  • jump to link inside an Ink file by clicking it or =C-c C-o= (links between Ink files are not supported)
  • command to playtest the game from Emacs: =C-c C-c=
    • start the game at a given knot or stitch with =C-c C-p=
  • outline: fold knots and stitches as in org-mode, with =<TAB>= and =S-<TAB>=
  • error reporting using flymake
  • a collection of YASnippet [[snippets/ink-mode][snippets]] for Ink
  • includes the [[https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md][Writing with ink]] language manual, which is displayed with =C-c C-h=

** Installing Add =ink-mode.el= to your load-path then add ~(require 'ink-mode)~ to your =init.el=. If you're a [[https://github.com/jwiegley/use-package][use-package]] user, add this instead of requiring ink-mode:

#+BEGIN_SRC emacs-lisp (use-package ink-mode :mode "\.ink\'") #+END_SRC

** Configuration

#+BEGIN_SRC emacs-lisp ;; Path to the Inklecate binary, used to playtest ;; and to check for errors (setq ink-inklecate-path "/usr/bin/inklecate")

;; Enable flymake (error reporting) (add-hook 'ink-mode-hook 'flymake-mode)

;; Set indentation level (add-hook 'ink-mode-hook (lambda () (setq tab-width 2))) #+END_SRC

** License This program is free software: you can redistribute it and/or modify it under the terms of the [[COPYING][GNU General Public License]] as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [[COPYING][GNU General Public License]] for more details.