seb-mueller / JumpToVerticalOccurrence

Like f{char}, but searching the same screen column, not line.

Home Page:http://www.vim.org/scripts/script.php?script_id=4841

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a mirror of http://www.vim.org/scripts/script.php?script_id=4841

DESCRIPTION
The f / F commands allow you to quickly go to next / previous occurrences
of a character in the same line (with plugins also across lines), but are
limited to horizontal movement. But vertical movement, restricted to the same
screen column the cursor is in, across lines would often be helpful, too.

This plugin provides a ]V{char} mapping that works just like f, but
vertically. The ]v mapping is similar, but uses the character under the
cursor instead of querying for it (which is a more common use case when moving
vertically).
The ]| mapping is helpful for jumping out of indented blocks, or to filled-out
columns, as it moves to the next non-whitespace in the current column.
In long sorted lists, one often wants to go to the first / last instance of
the current character (e.g. to move from "[A]ddress" to "Aardvark" or the last
"Azure" before the entries with "B" begin). The ]! mapping does that.

SOURCE
The ]| mapping was inspired by
    http://stackoverflow.com/questions/20882722/move-to-the-next-row-which-has-non-white-space-character-in-the-same-column-in-v

SEE ALSO
- The JumpToLastOccurrence.vim plugin (vimscript #3386) still moves
  horizontally in the same line, but counts the characters in reverse,
  starting from the last one.
- Check out the CountJump.vim plugin page (vimscript #3130) for a full list
  of motions and text objects powered by it.

USAGE
]v                  To [count]'th occurrence of the character under the cursor
                    in the same screen column of following lines.
[v                  To [count]'th occurrence of the character under the cursor
                    in the same screen column of previous lines.

]V{char}            To [count]'th occurrence of {char} in the same screen
                    column of following lines. Like f, but vertically.
[V{char}            To [count]'th occurrence of {char} in the same screen
                    column of previous lines. Like F, but vertically.
                    You can quickly repeat the same motion via the ]v / [v
                    mappings (like ; / , for f).

]|                  To [count]'th next line that has non-whitespace in the
                    same column as the current one.
[|                  To [count]'th previous line that has non-whitespace in the
                    same column as the current one.

]!                  To the last continuous occurrence of the character under
                    the cursor in the same screen column. With any [count],
                    skips over whitespace and shorter lines.
[!                  To the first continuous occurrence of the character under
                    the cursor in the same screen column. With any [count],
                    skips over whitespace and shorter lines.
                    Mnemonic: The ! looks like a column, with the dot marking
                    the jump target.

About

Like f{char}, but searching the same screen column, not line.

http://www.vim.org/scripts/script.php?script_id=4841


Languages

Language:Vim Script 100.0%