vim-raml


Ⅰ. 插件描述

Vim syntax and language settings for RAML

Ⅱ. 基本信息

创建日期:  2015-08-28
使用用户:  64
Github星:  33
插件作者:  Eric Hopkins

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'in3d/vim-raml-mine'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'in3d/vim-raml-mine'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'in3d/vim-raml-mine'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/in3d/vim-raml

Ⅳ. 文档说明

# vim-raml
Vim syntax and language settings for RAML

About

vim-raml is a superset of Vim's own syntax settings for YAML, as RAML itself is a superset of YAML. Obviously, filetype detection is provided for RAML files as well to make use of the expanded syntax, as well language formatting defaults.

The best way to showcase vim-raml is really just to show it.

This is a RAML file highlighted with Vim's default YAML highlighting, using the popular solarized-dark theme.

And this is a RAML file highlighted with vim-raml:

You'll notice several changes:

  • The RAML version header, manditory in RAML now stands out brightly, rather than looking like a comment.
  • Parameter interpolation i.e. <<thing>> is highlighted inside of blocks and values.
  • Delimiters and blocks i.e. -, |, etc are consistently highlighted (flaky in YAML).
  • HTTP verbs, response codes, data types, and route definitions are all colored separately from regular keys to help immediately distingush different levels of the data structure.

    • HTTP verbs include all that are supported by RAML: get, post, put, delete, head, patch, and options
    • Response codes e.g. 200, 201, 404, 401, etc are colored like numbers (for obvious reasons)
    • Data types e.g. type: integer. Supports all RAML datatypes. string, number, integer, date, boolean, and file.
    • Route definitions: these include /posts: or /{id}:

Installation

vim-raml doesn't have any strange or esoteric requirements.
Provided you're using Vundle, Pathogen or any of the other standard Vim plugin managers. You can install vim-raml exactly how you'd expect.

For completeness, to install via Vundle just add the following into your .vimrc with your other plugins

Plugin 'IN3D/vim-raml'

Then run:

:source %
:PluginInstall

Or for Pathogen:

cd ~/.vim/bundle
git clone https://github.com/IN3D/vim-raml.git

And Pathogen should pick it up the next time Vim is started.

Questions, suggestions, and issues

If you have a question, suggestion, or have found an issue with vim-raml. The best way to bring it to my attention is to open an issue at https://github.com/IN3D/vim-raml/issues.

License

Copyright (c) Eric Hopkins. Distributed under the same terms as Vim itself.
See :help license.

添加新评论