Ⅰ. 插件描述
A small plugin to create named bookmarks in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'andrewradev/simple-bookmarks-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'andrewradev/simple-bookmarks-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'andrewradev/simple-bookmarks-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/andrewradev/simple_bookmarks.vim
Ⅳ. 文档说明
The plugin provides several commands to manage named bookmarks. This is
similar to what you'd do with persistent marks, but brings the benefit of
longer, more rememberable names.
Here's an example:
:edit ~/.vimrc
:3
:Bookmark hereThis will store a bookmark called "here" in the file ~/.vim_bookmarks (changeable through a setting). To jump to the mark, use :GotoBookmark
:GotoBookmark hereThis will open the ~/.vimrc file and jump to the third line. The column is saved as well.
To delete the bookmark, use:
:DelBookmark hereBoth :GotoBookmark and :DelBookmark are tab-completed with all known bookmarks.
The command :CopenBookmarks will load all marks in the quickfix window for easier navigating.
Note that bookmarks should be synchronized between vim instances. Anytime you add a mark in one vim instance, it should be available in all others. In practice, this is achieved by simply reading and writing the whole file on each update. I have yet to experiment to find out if there are any performance issues or race conditions. If you find any issues, please open a bug report in the bugtracker.