Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n04ln/diesirae.nvim
👨💻 AOJ(Aizu Online Judge) for NeoVim
https://github.com/n04ln/diesirae.nvim
Last synced: about 1 month ago
JSON representation
👨💻 AOJ(Aizu Online Judge) for NeoVim
- Host: GitHub
- URL: https://github.com/n04ln/diesirae.nvim
- Owner: n04ln
- License: mit
- Created: 2017-11-13T10:11:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T04:06:45.000Z (over 1 year ago)
- Last Synced: 2024-06-20T03:27:00.408Z (7 months ago)
- Language: Go
- Homepage:
- Size: 539 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diesirae.nvim
![build](https://github.com/n04ln/diesirae.nvim/workflows/build/badge.svg?branch=master)
AOJ client for NeoVim
## Demo
[![asciicast](https://asciinema.org/a/188775.png)](https://asciinema.org/a/188775)
## How to install
### Require- NeoVim (>=0.2.1)
- go (>=1.11)### Install
1. get
``` sh
$ go get github.com/n04ln/diesirae.nvim
```2. write in your `init.vim` (or `.vimrc`)
``` vim
" using dein.nvim
call dein#add("n04ln/diesirae.nvim")
```## Usage
you need to set the following two environment variables
``` sh
$ export AOJ_ID=xxxxxxxx
$ export AOJ_RAWPASSWORD=yyyyyyyy
```diesirae.nvim provides 4 commands and 3 functions
### AojSelf
- Check session``` vim
:AojSelf
```### AojSession
- Get cookie when session does not exist
``` vim
:AojSession
```### AojSubmit
- This is Asynchronous
- And this is function. not command
- Submit source code in current buffer
- Please enter the ProblemID or URL
- The result(status) is written in a scratch buffer``` vim
:call AojSubmit("")
```or use `s` in normal mode.
This is interactive(`s` is `:call AojSubmit(input("problem id: "))`)### AojRunSample
- Try Sample Input/Output
- It is the same as using `AojSubmit`- This command requires setting of the `g:diesirae_config` variable
``` vim
let g:diesirae_config = {
\ 'commands': {
\ 'py': {
\ 'build_command': [],
\ 'exec_command': ['python3', '*source*']
\ },
\ 'go': {
\ 'build_command': ['go', 'build', '-o', '*bin*', '*source*'],
\ 'exec_command': ['*bin*']
\ }
\ }
\}
```- But It is not recorded on the AOJ server
``` vim
:call AojRunSample("")
```or use `t` in normal mode.
This is interactive(`t` is `:call AojRunSample(input("problem id: "))`)### AojDescription
- Get Description
``` vim
:call AojDescription("")
```or use `d` in normal mode.
This is interactive(`d` is `:call AojDescription(input("problem id: "))`)### AojStatus
- Get status of current buffer
``` vim
:AojStatus
```### AojStatusList
- Get status list of all buffers
``` vim
:AojStatusList
```