vim-visualmarks


Ⅰ. 插件描述

mark and retrieve selections in Vim

Ⅱ. 基本信息

创建日期:  2015-07-09
使用用户:  2
Github星:  14
插件作者:  Iago-lito

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

visualMarks

visualMarks is a small vimScript allowing marking and retrieving visually
selected blocks by associating them to marks, in way inspired from Vim's native
"registers".

Usage:

To use it with the default mapping and save the mark in register "a", type in visual mode:

ma

Note that to do the same, but save the selection in register "b" it would be
mb etc.

The default mapping to retrieve the mark from register "a" is this in normal
mode:

<a

And you will get it back. Of course, you can replace a with any mark you want.
These visual registers are saved in a separate file and are totally isolated from
the normal registers so a regular mark in register "a" will not get overwritten
by a visual mark in register "a".

This script also remembers which of the 3 visual modes you were in when you made
the mark, and it will recover that as well. So if you were in block visual, and
you retrieve your mark, you will have your mark selected in block visual.

These marks are also specific to a file, so a visual mark in file "a.txt" and a
visual mark in file "b.txt" of the same register name are different marks, and
will be persistent (ie, they will be able to be used after coming back to a file
after closing it).

Making Your Own Mapping:

To change the default mapping to something else, put this into your vimrc:

vmap <unique> m <Plug>VisualMarksVisualMark
nmap <unique> < <Plug>VisualMarksGetVisualMark

And then change the m or < to whatever you want to use.

A Note from the Developers:

A few more features will come soon I hope. Feel free to contribute of course if
you feel inspired! :)

添加新评论