vim-javascript


Ⅰ. 插件描述

Vastly improved vim's javascript indentation.

Ⅱ. 基本信息

创建日期:  2009-08-31
使用用户:  5
Github星:  11
插件作者:  Hsiaoming Yang

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'lepture/vim-javascript-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'lepture/vim-javascript-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'lepture/vim-javascript-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-javascript

JavaScript bundle for vim, this bundle provides syntax and indent plugins.

Indentation of javascript in vim is terrible, and this is the very end of it.

Feature

  1. very correct indentation for javascript
  2. support javascript indentation in html (provided by lepture)

Installation

If you are not using vundle, you really should have a try.
Edit your vimrc:

Bundle "pangloss/vim-javascript"

And install it:

:so ~/.vimrc
:BundleInstall

If you prefer tpope's pathogen, that's ok. Just clone it:

cd ~/.vim/bundle
git clone https://github.com/pangloss/vim-javascript.git

Configuration

html indentation
provided by Andy Wokula is faster. But you need to make some configuration.

Suggested configuration:

let g:html_indent_inctags = "html,body,head,tbody"
let g:html_indent_script1 = "inc"
let g:html_indent_style1 = "inc"

Head over to vim.org
for more information.

Bug report

Report a bug on GitHub Issues.

添加新评论