Ⅰ. 插件描述
Vim indenter for standalone and embedded JavaScriptⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'jason0x43/vim-js-indent'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'jason0x43/vim-js-indent'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'jason0x43/vim-js-indent'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/jason0x43/vim-js-indent
Ⅳ. 文档说明
vim-js-indent
Vim indenter for standalone and embedded JavaScript and TypeScript.
Installation
vim-plug
- Add
Plug 'jason0x43/vim-js-indent'
to your.vimrc
- Restart vim
- Run
:PlugInstall
Pathogen
Clone https://github.com/jason0x43/vim-js-indent.git
into your bundles
directory (~/.vim/bundle
).
Configuration
<dl>
<dt>js_indent_flat_switch
</dt>
<dd>Boolean, default=0
Set to 1 to make case
statements align with their containing switch
.</dd>
<dt>js_indent_logging
</dt>
<dd>Boolean, default=0
Set to 1 to enable logging comments (useful for debugging).</dd>
<dt>js_indent_typescript
</dt>
<dd>Boolean, default=1
Set to 0 to disable use of the JavaScript indenter for TypeScript buffers.</dd>
</dl>
License
Copyright © 2014-2016 Jason Cheatham. Distributed under the same terms as Vim
- See
:help license
.