Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk committed Oct 14, 2013
1 parent 0828f7e commit 790573d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@ characters:
* Press `sab` to **move the cursor** immediately to the next instance of the text "ab".
* Additional matches, if any, are highlighted until the cursor is moved.
* Press `;` to go to the next match.
* Press `ctrl-o` to go back to the starting point (this is a built-in Vim motion; Sneak
adds to Vim's [jumplist](http://vimdoc.sourceforge.net/htmldoc/motion.html#jumplist)
*only* on `s` invocation, *not* repeated matches, so you can
always abandon a trail of `;` or `,` by a single `ctrl-o` or ``)
* Press `ctrl-o` or `` to go back to the starting point.
* This is a built-in Vim motion; Sneak adds to Vim's [jumplist](http://vimdoc.sourceforge.net/htmldoc/motion.html#jumplist)
*only* on `s` invocation, *not* repeated matches, so you can
always abandon a trail of `;` or `,` by a single `ctrl-o` or ``).

Sneak can be *scoped* to a column by prefixing a number.
Sneak can be **scoped** to a column of width 2×{number} by prefixing `s`
with a number.

* Press `5sxy` to go immediately to the next instance of the text "xy"
**scoped to the 5 columns** left and right of the cursor. This is called
*vertical scope* sneak.
* The vertical scope is indicated by a vertical highlight block (which disappears as soon the cursor is moved).
scoped to the *5 columns left and right of the cursor*.
* This *vertical scope* is indicated by a highlight block.

Sneak is invoked with **operators** by using `z` (because `s` is taken by surround.vim).
Sneak is invoked with [**operators**](http://vimdoc.sourceforge.net/htmldoc/motion.html#operator)
by using `z` (because `s` is taken by surround.vim).

* Press `dzqt` to delete the text from the cursor to the next instance of the text "qt".
* Press `.` to repeat the `dzqt` operation.
* Requires [repeat.vim](https://github.com/tpope/vim-repeat)
* Press `.` to repeat the `dzqt` operation.
* Press `gUz }` to upper-case the text from the cursor to the next instance of
the text " }".
* Press `.` to repeat the `gUz }` operation.

### Overview

Expand Down
1 change: 1 addition & 0 deletions autoload/sneak/debug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func! sneak#debug#report()
call s:dbgflag('&magic')
call s:dbgflag('&buftype')
call s:dbgflag('&virtualedit')
call s:dbgflag('&background')
silent exec 'verbose map s | map S | map z | map Z'
redir END
enew
Expand Down
4 changes: 1 addition & 3 deletions plugin/sneak.vim
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
" sneak.vim - Vertical motion for Vim
" sneak.vim - The missing motion
" Author: Justin M. Keyes
" Version: 1.0
" http://www.reddit.com/r/vim/comments/1io1bs/how_do_you_move_around_vertically/
" http://www.reddit.com/r/vim/comments/1j9gm1/serious_question_what_do_you_all_think_is_a/

if exists('g:loaded_sneak_plugin') || &compatible || v:version < 700
finish
Expand Down

0 comments on commit 790573d

Please sign in to comment.