Ⅰ. 插件描述
Autojump to 1st non-blank when j/k into leading spaces.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'fcpg/vim-shore'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'fcpg/vim-shore'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'fcpg/vim-shore'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/fcpg/vim-shore
Ⅳ. 文档说明
vim-shore
Autojump to 1st non-blank when j/k into leading spaces.
(blue highlight for illustration purposes only, the plugin doesn't set it).
Why not use +, - or <cr>?
Because I can move faster with hjkl, for short motions.
99 out of 100, I don't want to move into leading spaces, so this is just a better default for people who have a similar usage.
Settings
let g:shore_stayonfront = 1to also move back to 1st non-blank (in addition to moving forward).g:shore_key_downandg:shore_key_upto map to non-default keys (or use the<plug>maps below).let shore_nomaps = 1to prevent mappings.
Maps:
<Plug>(shore)down<Plug>(shore)up
Mapped by default to j/k
Command:
:ToggleShoretoggle plugin mappings on/off
Pluginophobia
If you don't like plugins, feel free to steal the code into your vimrc.
The heart can think of no devotion
Greater than being shore to the ocean--
Holding the curve of one position,
Counting an endless repetition.
