Skip to content

jarpy/ks-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ks-mode

ks-mode screenshot

ks-mode is an Emacs major mode for editing Kerboscript, the language of the kOS Scriptable Autopilot for Kerbal Space Program.

Features

  • Syntax highlighting for Kerboscript's keywords, built-in functions and constants.
  • Growing list of highlights for known object suffixes like SHIP:VELOCITY:ORBIT.
  • Strong auto-indentation. It can handle all the examples in kslib. Try ks-indent-buffer.

Planned Features

  • Interaction with the kOS processor. (Think C-c C-c to run your script live in KSP).

Installation

Clone this repository, or just download ks.el.

If you use vanilla Emacs, you might want something like this in your .emacs file:

(add-to-list 'load-path "~/src/ks-mode/")
(require 'ks)

If you use Emacs Prelude (I love it), just drop ks.el in ~/.emacs.d/personal.

Perhaps one day, ks-mode will be a MELPA package, and this section will not be needed.

Configuration

The default indentation size is 2 spaces. You can change it with:

(setq ks-indent 4)

Communication

Please get in touch if you have any trouble, have a feature request, or just want to say 'hi' to a fellow Kerbal Space Programmer.

toby@jarpy.net or @jarpy on Twitter.

If you get any value from ks-mode, then you've made my day.

Contributing

If you find a bug, particularly with auto-indentation, please tell me. I will be very grateful! A snippet of Kerboscript that indents incorrectly is all that's needed.

If you're feeling adventurous however, the indentation code is covered by behavioural acceptance tests written with Cucumber. By all means write a new test if you'd like to. Should you then go on and write Lisp that causes the test to pass... well... 💚.

About

Kerboscript major mode for Emacs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published