BOOKMARKS: Mark & Highlight Full Lines


Ⅰ. 插件描述

Easily Highlight Lines with Marks, and Add/Remove Marks

Ⅱ. 基本信息

创建日期:  2011-01-08
使用用户:  1
Github星:  1
插件作者:  Ignacio Nunez

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/bookmarks-mark-highlight-full-lines'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/bookmarks-mark-highlight-full-lines'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/bookmarks-mark-highlight-full-lines'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Mark-and-Highlight-Full-Lines

Ⅳ. 文档说明

Inspired by Kate 'bookmarks' and other scripts in this site, I devised a new way to mark full lines and highlight them.

The idea is to mark lines and then jump from one to the other, in an easier way than the one Vim provides.

Lines with markers are highlighted, which is convenient to visually spot where the mark is.

One does not need to remember which markers are already in use and which are free anymore, just add marks and remove marks, and the script will manage where to store them or free them.

USAGE:
<F1>            Turn on/update highlighting for all lines with markers
<F2>            Turn off highlighting for lines with markers
<SHIFT-F2> Erase all markers [a-z]
<F5>             Add a mark on the current line (and highlight)
<SHIFT-F5> Remove the mark on the current line

Then, just jump from one mark to the next using the classic [' and ]' jumps

Try it! it's nice!

NOTE:
Of course, the highlight group I define ("Marks") should be tweaked to one's taste, and the same applies to the keyboard mappings.

NOTE-UPDATE:
The classic marking method (ie. typing 'ma', 'mb', 'mc'...) can be used in combination with this one, but one has to be careful not to overwrite an existing mark. Check with the :marks command. HINT: the code marks from the 'a' to the 'z', so if there are not too many marks, one can safely assume that the last ones ('z 'x 'y 'w ...) are safe to use.

Enjoy...

添加新评论