indent-highlight.vim


Ⅰ. 插件描述

Vim plugin to highlight current block

Ⅱ. 基本信息

创建日期:  2014-06-29
使用用户:  1
Github星:  3
插件作者:  Emil Soman

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

indent-highlight.vim

Vim plugin to highlight current block based on indentation levels.

Features

  • Works with multiple buffers/splits/windows
  • Configurable to set custom highlight color
  • Easily toggle highlights

Usage

<Leader>ih toggles the current block (guessed by indentation levels).

To map your custom shortcut, add this to your vimrc.

map <silent> SHORTCUT :IndentHighlightToggle<CR>

For example, to map :IndentHighlightToggle to <leader>i ,

map <silent> <leader>i :IndentHighlightToggle<CR>

Installation

This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers:

  • Pathogen

    • git clone https://github.com/emilsoman/indent-highlight.vim ~/.vim/bundle/indent-highlight.vim
  • NeoBundle

    • NeoBundle 'emilsoman/indent-highlight.vim'
  • Vundle

    • Plugin 'emilsoman/indent-highlight.vim'
  • manual

    • copy all of the files into your ~/.vim directory

Configuration

These configurations are available to set in your ~/.vimrc

let g:indent_highlight_disabled = 1       " Disables the plugin, default 0
let g:indent_highlight_bg_color = 235     " Color to be used for highlighting, default 233
let g:indent_highlight_start_disabled = 0 " Disable indent-highlight, enable by explicitly toggling, default 1

License

MIT License. Copyright (c) 2014 Emil Soman

添加新评论