Ⅰ. 插件描述
A vim plugin that remembers your history of cursor locations allowing you to cycle through them easily. Inspired by QT creatorsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'fergdev/vim-cursor-hist'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'fergdev/vim-cursor-hist'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'fergdev/vim-cursor-hist'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/fergdev/vim-cursor-hist
Ⅳ. 文档说明
Vim-cursor-hist
A vim plugin that remembers your history of cursor locations allowing you to cycle through them easily. Inspired by QT creators <ALT-Left> <ALT-right> behaviour.
Usage
Vim-cursor-hist listens for the autocommand CursorHold and adds the current cursor position to the list of stored positions. Forward and back functions are provided to cycle throught the list of stored positions.
Default key mappings are provided below ... feel free to change them to whatever suites you :)
nnoremap <leader>j :call g:CursorHistForward()<CR>
nnoremap <leader>k :call g:CursorHistBack()<CR>
Currently the cursor history is cleared on the BufferEnter autocommand. Support for jumping between buffers will be added ASAP.
Installation
Pathogen (https://github.com/fergdev/vim-cursor-hist)
git clone https://github.com/fergdev/vim-cursor-hist ~/.vim/bundle/vim-cursor-hist
Vundle (https://github.com/gmarik/vundle)
Plugin 'fergdev/vim-cursor-hist'