vim-lua


Ⅰ. 插件描述

Improved Lua 5.3 syntax and indentation support for Vim

Ⅱ. 基本信息

创建日期:  2015-09-25
使用用户:  89
Github星:  67
插件作者:  Thiago Bastos

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tbastos/vim-lua-sweeter-than-fiction'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tbastos/vim-lua-sweeter-than-fiction'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tbastos/vim-lua-sweeter-than-fiction'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-lua

Improved Lua 5.3 syntax and indentation support for Vim.

Highlighting: stock Vim (left) vs. this plugin (right):

(Color scheme: solarized dark; Font: Anonymous Pro)

Configuration

vim-lua supports a few options. All are boolean and off by default: set an
option to 1 with let g:lua_syntax_someoption = 1 to enable it (setting to 0
for disabling is currently not supported -- just don't set the option at all to
keep it disabled).

  • g:lua_syntax_nosymboloperator disables highlighting of the Lua symbol
    operators (that is, all operators except for the keyword operators and and

or).

  • g:lua_syntax_nofold disables code folding. If this option is set, you can
    selectively reenable some folds with g:lua_syntax_fold_<group> where

<group> can be table, comment, function, control or string. You can also
have even more fine-grained control by enabling specific syntax regions
instead of groups. Look in the source code for the second argument of `call
s:FoldableRegion` for all options, but note that the names are subject to
change in later versions.

  • g:lua_syntax_nostdlib disables highlighing of all standard library names
    like, io, print and even require, error etc. If that is too much you

can use g:lua_syntax_noextendedstdlib instead to keep _G, module,
require, assert, error, pcall and xpcall highlighted.

Contributing

Contributions are welcome! Please follow the existing code style and in your
pull request explain the reason for the proposed change and how it is valuable.

Credits

The indent code was based off this gist.

Various configuration options were contributed by Christian Neumüller
(@Oberon00).

添加新评论