Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted to markdown language and formatted code #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 56 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,58 @@
# hackerearth.vim

<p>HackerEarth Vim plugin to compile and run code from the comfort of your favorite editor.
<br>The plugin is built using <a target="_new" href="http://developer.hackerearth.com/">HackerEarth Api</a>.</p>

QUICK INSTALL<br>
==============
<ul>
<li>Download the plugin.</li>
<li>Copy the hackerearth.vim file to <pre>$HOME/.vim/plugin</pre></li>
<li>Register a new client key from <a target="_new" href="http://www.hackerearth.com/api/register/">http://www.hackerearth.com/api/register</a></li>
<li>In your .vimrc file enter the following line:<pre>let g:HackerEarthApiClientKey = "&lt;new-client-key&gt;"</pre></li>
</ul>

COMMAND SHORTCUTS<br>
=================
<ul>
<li>Open a file in vim editor.</li>
<ul>
<li>To run: <b>ctrl+h r</b></li>
<li>To compile: <b>ctrl+h c</b></li>
<li>For help: <b>ctrl+h h</b></li>
</ul>
</ul>

COMMANDS<br>
========
<p>
To run:<pre>:Hrun -s=source.cpp, -i=input.txt, -o=output.txt</pre>
To compile:<pre>:Hcompile -s=source.cpp, -i=input.txt, -o=output.txt</pre>
For help:<pre>:Hhelp</pre>
</p>
<p>Arguments:
<ul>
<li>-s: source file, optional; default value is currently opened file in vim</li>
<li>-i: input file, optional; give input to your programme from this file</li>
<li>-o: output file, optional; use this if you want to save the output of your programme</li>
<li>-t: time limit, optional</li>
<li>-m: memory limit, optional</li>
</ul>
<b>Note*: </b>File paths can be both absolute and relative(relative to system current working directory).<br>
<b>Tip*: </b>To autocomplete file path, use space after '=' and press TAB.
</p>

INFO<br>
====
<ul>
<li>Supported programming languages: C, CPP, CPP11, CLOJURE, JAVA, JAVASCRIPT, HASKELL, PERL, PHP, PYTHON, RUBY</li>
</ul>
<b>Note*:</b> The plugin will not work without HackerEarth api client key.
HackerEarth Vim plugin can be used to compile and run code directly from vim editor. This plugin is built using [HackerEarth API](http://developer.hackerearth.com/).

## QUICK INSTALL

1. Download the plugin.</li>
2. Copy the hackerearth.vim file to `$HOME/.vim/plugin`.
3. Register a new client key from [http://www.hackerearth.com/api/register](http://www.hackerearth.com/api/register).
4. In your `.vimrc` file enter the following line:

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

## COMMAND SHORTCUTS

1. To run: <kbd>ctrl</kbd> + <kbd>h</kbd> <kbd>r</kbd>
2. To compile: <kbd>ctrl</kbd> + <kbd>h</kbd> <kbd>c</kbd>
3. For help: <kbd>ctrl</kbd> + <kbd>h</kbd> <kbd>h</kbd>

## COMMANDS

To run:

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

To compile:

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

For help:

```sh
: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 <kbd>TAB</kbd>.

### 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.