GithubHelp home page GithubHelp logo

ka-tsu-mo / at-vim-coder Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 137 KB

Be contestant of AtCoder on Vim8/Neovim

License: MIT License

Python 40.51% Vim Script 59.49%
vim-plugin vim-plugins atcoder

at-vim-coder's Introduction

at-vim-coder

Be contestant of AtCoder on Vim8/Neovim

Requirements

  • Neovim with python3 and floating window
  • vim8 with python3 and popup
  • python3 modules
    • Beautiful Soup 4
    • requests

Demo

atvimcoder_demo

Usage

" Login to AtCoder. It's necessary for submitting code.
AtVimCoder login

" Logout from AtCoder.
AtVimCoder logout

" Check if logged in or not.
AtVimCoder status

" Participate contest specified by contest ID( and solve task if task ID specified)
" e.g. AtVimCoder abc111 or AtVimCoder abc111:A
AtVimCoder {contest ID}
AtVimCoder {contest ID}:{task ID}

Option variables

g:at_vim_coder_workspace

workspace for at-vim-coder (create directory named {contest ID} under this directory)

let g:at_vim_coder_workspace = 'path/to/workspace'

g:at_vim_coder_template_file

if specified, copy the file to solve task

let g:at_vim_coder_template_file = 'path/to/template_file'

g:at_vim_coder_language

language to participate (currently only 3 languages are available)

Please set to 'C++ (GCC 9.2.1)', 'Go (1.14.1)' or 'Python (3.8.2)'. These languages are based on Language Test 202001

let g:at_vim_coder_language = 'C++ (GCC 9.2.1)' " default

g:at_vim_coder_save_cookies

if 1, save session cookies to local (if logout, delete this cookies)

let g:at_vim_coder_save_cookies = 1

g:at_vim_coder_process_runner

This plugin use subprocess module of python3, so you must let plugin know path to python3.

if not set, get g:python3_host_prog, and g:python3_host_prog is not set, get from command where python | which python.

let g:at_vim_coder_process_runner = 'path/to/python3'

g:at_vim_coder_locale

Please set to 'en' or 'ja'. If not set, get $LANG and use the firt two characters.

let g:at_vim_coder_locale = 'ja'

Command

<Plug>(at-vim-coder-check-status)  :<C-u>call at_vim_coder#contest#check_status()<CR>
<Plug>(at-vim-coder-run-test)      :<C-u>call at_vim_coder#contest#test()<CR>
<Plug>(at-vim-coder-submit)        :<C-u>call at_vim_coder#contest#submit()<CR>

on {contest ID}_task_list buffer, above 3 actions are mapped by following key

  • c
    • check contest status.
    • Popup window will appear and you can get information about submission and local test result.
  • t
    • run local test.
  • s
    • submit code. login required.

Also, you can map 3 actions by configuring like:

nmap <silent> ;c <Plug>(at-vim-coder-check-status)
nmap <silent> ;t <Plug>(at-vim-coder-run-test)
nmap <silent> ;s <Plug>(at-vim-coder-submit)

at-vim-coder's People

Contributors

ka-tsu-mo avatar rugamaga avatar

Stargazers

 avatar  avatar

Watchers

 avatar

at-vim-coder's Issues

Supports language updates

from ABC162, AtCoder updates language for contest based on here

This plugin should supports both ~ABC162 and ABC162~ until AtCoder updates language on past problem(~ABC162)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.