vim-shore


Ⅰ. 插件描述

Autojump to 1st non-blank when j/k into leading spaces.

Ⅱ. 基本信息

创建日期:  2017-12-14
使用用户:  2
Github星:  7
插件作者:  fcpg

Ⅲ. 安装方法

使用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.

asciicast

(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 = 1 to also move back to 1st non-blank (in addition to moving forward).
  • g:shore_key_down and g:shore_key_up to map to non-default keys (or use the <plug> maps below).
  • let shore_nomaps = 1 to prevent mappings.

Maps:

  • <Plug>(shore)down
  • <Plug>(shore)up

Mapped by default to j/k

Command:

  • :ToggleShore toggle 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.

License

Attribution-ShareAlike 4.0 Int.

添加新评论