onivim / reason-libvim

Reason API for libvim

Home Page:https://v2.onivim.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Reason API for libvim

https://v2.onivim.io

License:MIT License


Languages

Language:Reason 86.1%Language:C 13.3%Language:C++ 0.5%Language:Shell 0.1%