aboutsummaryrefslogtreecommitdiff
path: root/doc/keep_position.txt
blob: 25de36f7b4ec420fccb71fa8d858356c5d30a608 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
*keep_position.txt*	For Vim version 7.0	Last change: 2019 Jun 3

DESCRIPTION				*keep_position*

This tiny plugin provides a command prefix to run commands without moving the
cursor or window view around.  It does this by saving the window view before
running the command, and then restoring it afterwards.

REQUIREMENTS				*keep_position-requirements*

This plugin only loads if 'compatible' is not set.  It also requires the
|+user_commands| feature.

COMMANDS				*keep_position-commands*

					*:KeepPosition*
Run the given command while preserving the cursor position and window view.
Works rather like |:keepalt| or |:keepjumps|.  It's good for filters,
especially ones that work on the entire buffer:
>
    :KeepPosition %!tidy
<
AUTHOR					*keep_position-author*

Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.

LICENSE					*keep_position-license*

Licensed for distribution under the same terms as Vim itself (see |license|).

 vim:tw=78:ts=8:ft=help:norl: