Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onivim/reason-libvim
Reason API for libvim
https://github.com/onivim/reason-libvim
libvim ocaml oni onivim reason reasonml vim
Last synced: 3 months ago
JSON representation
Reason API for libvim
- Host: GitHub
- URL: https://github.com/onivim/reason-libvim
- Owner: onivim
- License: mit
- Archived: true
- Created: 2019-06-05T01:49:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-27T01:07:49.000Z (over 4 years ago)
- Last Synced: 2024-05-11T23:37:11.728Z (6 months ago)
- Topics: libvim, ocaml, oni, onivim, reason, reasonml, vim
- Language: Reason
- Homepage: https://v2.onivim.io
- Size: 528 KB
- Stars: 21
- Watchers: 7
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - reason-libvim
README
> __NOTE:__ This is now deprecated - future development is happening in the core [Onivim 2](https://github.com/onivim/oni2) repo.
# reason-libvim
[![Build Status](https://dev.azure.com/onivim/oni2/_apis/build/status/onivim.reason-libvim?branchName=master)](https://dev.azure.com/onivim/oni2/_build/latest?definitionId=5&branchName=master)Reason API for [libvim](https://github.com/onivim/libvim) - an abstraction of Vim as an API.
## Usage
- Call `vimInit()` before anything else
- Call `vimInput("i")` or `vimInput("")` 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](https://github.com/onivim/reason-libvim/tree/master/test)
## Documentation
Documentation is available [here](https://onivim.github.io/reason-libvim/libvim/Vim/index.html)
## License
[MIT License](./LICENSE)
Copyright 2019 Outrun Labs, LLC