Skip to content
This repository was archived by the owner on May 27, 2020. It is now read-only.

onivim/reason-libvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dc4740a · May 27, 2020
May 13, 2020
May 21, 2020
May 13, 2020
Jun 13, 2019
May 13, 2020
May 13, 2020
May 13, 2020
May 13, 2020
Apr 11, 2020
Jun 7, 2019
Jun 13, 2019
May 27, 2020
Mar 20, 2020
Jun 13, 2019
Jan 4, 2020
Jan 4, 2020
Jun 12, 2019
Jun 7, 2019
May 13, 2020
Jan 31, 2020
May 13, 2020
Jul 18, 2019

Repository files navigation

NOTE: This is now deprecated - future development is happening in the core Onivim 2 repo.

reason-libvim

Build Status

Reason API for libvim - an abstraction of Vim as an API.

Usage

  • Call vimInit() before anything else

  • Call vimInput("i") or vimInput("<esc>") to send keystrokes

  • Call vimCommand("%s/hello/world/g") to execute Ex commands

  • Introspect the state with the API, for example:

vimInit();

vimCommand("e ./aBigFile.txt");

/* Use 'G' to move to the end of the file */
vimInput("G");

/* Print line position */
print_endline ("Cursor is at line: " ++ string_of_int(Cursor.getLine()));

/* Type a at the beginning of the line */
vimInput("I");
vimInput("a");

For more example usage, see the test cases

Documentation

Documentation is available here

License

MIT License

Copyright 2019 Outrun Labs, LLC