AOJ client for NeoVim
- NeoVim (>=0.2.1)
- go (>=1.11)
- get
$ go get github.com/n04ln/diesirae.nvim
- write in your
init.vim
(or.vimrc
)
" using dein.nvim
call dein#add("n04ln/diesirae.nvim")
you need to set the following two environment variables
$ export AOJ_ID=xxxxxxxx
$ export AOJ_RAWPASSWORD=yyyyyyyy
diesirae.nvim provides 4 commands and 3 functions
- Check session
:AojSelf
- Get cookie when session does not exist
:AojSession
- 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
:call AojSubmit("<PROBLEM_ID_OR_URL>")
or use <C-d>s
in normal mode.
This is interactive(<C-d>s
is :call AojSubmit(input("problem id: "))
)
-
Try Sample Input/Output
- It is the same as using
AojSubmit
- It is the same as using
-
This command requires setting of the
g:diesirae_config
variable
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
:call AojRunSample("<PROBLEM_ID_OR_URL>")
or use <C-d>t
in normal mode.
This is interactive(<C-d>t
is :call AojRunSample(input("problem id: "))
)
- Get Description
:call AojDescription("<PROBLEM_ID_OR_URL>")
or use <C-d>d
in normal mode.
This is interactive(<C-d>d
is :call AojDescription(input("problem id: "))
)
- Get status of current buffer
:AojStatus
- Get status list of all buffers
:AojStatusList