JumpToLastOccurrence


Ⅰ. 插件描述

f{char} motions that count from the end of the line.

Ⅱ. 基本信息

创建日期:  2010-12-29
使用用户:  4
Github星:  6
插件作者:  Ingo Karkat

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

DESCRIPTION
The f{char}, F, t and T family of motions are often more effective
than the more general l, w and W motions. However, there are situations
where they are difficult to apply.
Take a long file system path like /var/opt/foo/a/very/long/path/to/filename.
Imagine you are on the beginning / and want to change the entire directory
path, but keep the filename. You'd either have to count occurrences (e.g. c8f/
or c2tf), do multiple moves ($T/cB), use visual mode (veeeeeeeelc), or a
search (c/filen<CR>).

This plugin extends the built-in f/F/t/T motions with counterparts that move
to the last occurrence of {char} in the line. For the above example, that
would be a short c,f/ to jump to the last slash in the line.

SEE ALSO

  • The JumpToVerticalOccurrence.vim plugin (vimscript #4841) implements
      variations of f / F that move vertically across lines, restricted to the

  same screen column as the cursor.

USAGE
,f{char}                To [count]'th occurrence of {char}, counting from the
                        end of the line. The cursor is placed on {char}
                        inclusive.
,F{char}                To the [count]'th occurrence of {char}, counting from
                        the beginning of the line. The cursor is placed on
                        {char} exclusive.
,t{char}                Till before [count]'th occurrence of {char}, counting
                        from the end of the line. The cursor is placed on the
                        character left of {char} inclusive.
,T{char}                Till after [count]'th occurrence of {char}, counting
                        from the beginning of the line. The cursor is placed
                        on the character right of {char} exclusive.

                        All motions can be repeated with ; and ,. However,
                        the ,t and ,T motions will jump to, not until, the
                        next {char}.

添加新评论