vivekpatel111 / hackerearth.vim

HackerEarth Vim plugin to compile and run code from the comfort of your favorite editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hackerearth.vim

HackerEarth Vim plugin can be used to compile and run code directly from vim editor. This plugin is built using HackerEarth API.

QUICK INSTALL

  1. Download the plugin.

  2. Copy the hackerearth.vim file to $HOME/.vim/plugin.

  3. Register a new client key from http://www.hackerearth.com/api/register.

  4. In your .vimrc file enter the following line:

    let g:HackerEarthApiClientKey = "<api-client-key>"

COMMAND SHORTCUTS

  1. To run: ctrl + h r
  2. To compile: ctrl + h c
  3. For help: ctrl + h h

COMMANDS

To run:

:Hrun -s=source.cpp, -i=input.txt, -o=output.txt

To compile:

:Hcompile -s=source.cpp, -i=input.txt, -o=output.txt

For help:

:Hhelp

Arguments:

  • -s: source file, optional; default value is currently opened file in vim
  • -i: input file, optional; give input to your programme from this file
  • -o: output file, optional; use this if you want to save the output of your programme
  • -t: time limit, optional
  • -m: memory limit, optional

Note: File paths can be both absolute and relative(relative to system current working directory).

Tip: To autocomplete file path, use space after = and press TAB.

INFO

  • Supported programming languages: C, CPP, CPP11, CLOJURE, JAVA, JAVASCRIPT, HASKELL, PERL, PHP, PYTHON, RUBY

Note: The plugin will not work without HackerEarth API client key.

About

HackerEarth Vim plugin to compile and run code from the comfort of your favorite editor.


Languages

Language:Vim Script 100.0%