Skip to content

πŸ‘¨β€πŸ’» AOJ(Aizu Online Judge) for NeoVim

License

Notifications You must be signed in to change notification settings

n04ln/diesirae.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

diesirae.nvim

build

AOJ client for NeoVim

Demo

asciicast

How to install

Require

  • NeoVim (>=0.2.1)
  • go (>=1.11)

Install

  1. get
$ go get github.com/n04ln/diesirae.nvim
  1. write in your init.vim (or .vimrc)
" using dein.nvim
call dein#add("n04ln/diesirae.nvim")

Usage

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

AojSelf

  • Check session
:AojSelf

AojSession

  • Get cookie when session does not exist
: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
: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: ")))

AojRunSample

  • Try Sample Input/Output

    • It is the same as using AojSubmit
  • 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: ")))

AojDescription

  • 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: ")))

AojStatus

  • Get status of current buffer
:AojStatus

AojStatusList

  • Get status list of all buffers
:AojStatusList

About

πŸ‘¨β€πŸ’» AOJ(Aizu Online Judge) for NeoVim

Resources

License

Stars

Watchers

Forks

Packages

No packages published