HackerEarth Vim plugin to compile and run code from the comfort of your favorite editor.
Vim script
Switch branches/tags
Nothing to show
Clone or download
iamsudip Merge pull request #1 from ThorodanBrom/ThorodanBrom-patch-1
Corrected spelling mistakes in README.md
Latest commit d302c98 Apr 25, 2017
Permalink
Failed to load latest commit information.
README.md Corrected spelling mistakes in README.md Apr 25, 2017
hackerearth.vim add little more documentation Jun 20, 2013

README.md

hackerearth.vim

HackerEarth Vim plugin to compile and run code from the comfort of your favorite editor.
The plugin is built using HackerEarth Api.

QUICK INSTALL

  • Download the plugin.
  • Copy the hackerearth.vim file to
    $HOME/.vim/plugin
  • Register a new client key from http://www.hackerearth.com/api/register
  • In your .vimrc file enter the following line:
    let g:HackerEarthApiClientKey = "<new-client-key>"

COMMAND SHORTCUTS

  • Open a file in vim editor.
    • To run: ctrl+h r
    • To compile: ctrl+h c
    • 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.