This vim plugin brings syntax highlighting and linting for API Blueprint.
The plugin adds an apiblueprint
file type along with an apiblueprint
syntax.
Using syntastic, your API Blueprint can be linted on each save. For this, you will need to install both drafter and syntastic.
You can use the apiary client with this plugin to load a blueprint from Apiary directly providing apiary client is installed and configured.
$ vim apiary:pollsapi
Providing you have drafter
installed. You can use GenerateRefract
function to generate a preview of the Refract
structure for your API Blueprint in a split.
You can manually map this function to a keyboard shortcut. For example to
ctrl+b
:
autocmd FileType apiblueprint nnoremap <C-b> :call GenerateRefract()<cr>
If you have TagBar installed you can use it to list and jump to groups and resources.
The are snippets in the snipMate format, supported by many Vim snippet plug-ins.
With vim-plug (recommended)
Add:
Plug 'kylef/apiblueprint.vim'
To your .vimrc
and run PlugInstall
inside vim.
With Vundle
Add:
Plugin 'kylef/apiblueprint.vim'
To your .vimrc
and run PluginInstall
from within vim or vim +PluginInstall +qall
from the command line
With Pathogen
$ git clone https://github.com/kylef/apiblueprint.vim.git ~/.vim/bundle/apiblueprint.vim