Ⅰ. 插件描述
Togglable syntax highlighting of tabs, nbsps and trailing spaces.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'jpalardy/spacehi-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'jpalardy/spacehi-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'jpalardy/spacehi-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/jpalardy/spacehi.vim
Ⅳ. 文档说明
spacehi.vim
This all started on vim.org. This plugin hadn't been touched in 10 years, it just worked.
Original quote:
This plugin will highlight tabs and trailing spaces on a line, with the ability
to toggle the highlighting on and off. Using highlighting to illuminate these
characters is preferrable to using listchars and "set list" because it allows
you to copy from the vim window without getting listchars shrapnel in your
buffer.
The highlighting is done on a per buffer basis, and can be toggled on and off
easily (the default binds to F3 if it's unbound).
I added support for non-breaking spaces (nbsp) because I've been burned one too many times by a copy and paste.
I also changed the colors to, if I remember correctly, how spacehi used to look (very loud). The colors can be adjusted by setting the global variables:
let g:spacehi_tabcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"
let g:spacehi_spacecolor="ctermfg=Black ctermbg=Yellow guifg=Blue guibg=Yellow"
let g:spacehi_nbspcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"
Installation
I recommend installing pathogen.vim, and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/jpalardy/spacehi.vim.git
If you like it the hard way, copy plugin/spacehi.vim from this repo into ~/.vim/plugin.