GitXplorerGitXplorer
p

vim-annotations

public
1 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
109e17c42008f79f550c447a6713a695a4af1ae0

Update README.md

ppanagosg7 committed 11 years ago
Unverified
b4e5de6fd5199436ad4632b909f4ba0ce699eef1

Merge pull request #3 from ranjitjhala/master

ppanagosg7 committed 11 years ago
Unverified
78b6708d9195334085036110e3e83f86991bbd9a

asdasd

rranjitjhala committed 11 years ago
Unverified
827bd0b471ecc17294e2a0c9fd04c3cf3196eccd

ASDASD

rranjitjhala committed 11 years ago
Unverified
ebfa8c269306a3179f0972052927a922f3fa05b4

ASDAD

rranjitjhala committed 11 years ago
Unverified
4ee354410abff282c9ce3f634025cbe27dd32390

Merge pull request #2 from ranjitjhala/master

ppanagosg7 committed 11 years ago

README

The README file for this repository.

vim-annotations

Vim plugin intended for displaying type annotations of programs produced by tools like RefScript.

alt tag

This plugin has been inspired by the following plugins:

Installation

The easiest way to install is through Vundle

Just add the following line in your .vimrc:

Bundle "panagosg7/vim-annotations"

Valid input

This plugin is intended for displaying type annotations of TypeScript programs produced by [nano-js] (https://github.com/UCSD-PL/nano-js).

In particular, the format recognized is the following:

<col1>:<line1>-<line2>:<col2>::<content>

Where <col1> and <line1> are the column and line of the beginnig of the annotated code and <col2> and <line2> those of the end. <Content> can be any singel-line string. End of line (\n) is supported, and will be shown accordingly.

Usage

Load annotation file

:LoadAnns /path/to/annotation/file

After the annotation file has been loaded the following operations are enabled.

Load default annotation file

:LoadAnnsDefault

The above loads the default annotations file foo.vim.annot, sparing the user from having to specify a particular annotation file, if so desired.

Invoke type query

  • Move cursor on expression that needs to be identified.
  • Hit <F1>. The relevant type should appear in the quickfix box.
  • By hitting <F1> multiple times, you can iterate over the possibly many expressions that contain the current screen cell. The expression that is identified every time will be highlighted.

Clear highlight

Hit <F2>, to clear selection.

Hover Annotations

On gvim or macvim hovering the mouse over an identifier will display the inferred type for the identifier, if one exists.

hover type display