/
indexed-search.txt
106 lines (84 loc) · 4.77 KB
/
indexed-search.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
*indexed-search.txt* Show match's count and index with search command
Author: Yakov Lerner
Otto Modinos
INTRODUCTION *indexed-search*
This plugin redefines 6 search commands (/,?,n,N,*,#). At every
search command, it automatically prints >
"At match #N out of M matches".
<
-- the total number of matches (M) and the number(index) of current match (N).
This helps to get oriented when searching forward and backward.
There's only one command and no new behavior to learn. Just watch the bottom
line when you do /,?,n,N,*,#.
Works on vim7. Won't cause slowdown on very large files (but then counters
are not displayed).
=============================================================================
COMMANDS *indexed-search-commands*
*:ShowSearchIndex*
:ShowSearchIndex Shows a message indicating your position relative to
the search matches in the file. The message's content
also depends on the value of the |g:indexed_search_shortmess|
|g:indexed_search_line_info| and |g:indexed_search_colors| options.
=============================================================================
OPTIONS *indexed-search-options*
*g:indexed_search_mappings*
g:indexed_search_mappings
If 0, does not create mappings. |indexed-search-mappings|
Default: 1
*g:indexed_search_dont_move*
g:indexed_search_dont_move
If 1, the mappings for * and # stay on the word under the
cursor. Basically, *N (or #N).
Default: 0
*g:indexed_search_center*
g:indexed_search_center
If 1, the mappings for n and N also center the cursor on the
match. Basically, nzz (or Nzz).
Default: 0
*g:indexed_search_max_lines*
g:indexed_search_max_lines
If a file has more lines than this, the plugin doesn't display
messages, for performance reasons. |indexed-search-performance|
Default: 3000
*g:indexed_search_max_hits*
g:indexed_search_max_hits
When there are more matches than this, the plugin doesn't try
to count all of them. Instead it says, e.g. "> 1000 matches"
Default: 1000 |indexed-search-performance|
*g:indexed_search_colors*
g:indexed_search_colors
If 0, the messages are not displayed in color
Default: 1
*g:indexed_search_line_info*
g:indexed_search_line_info
If 1, the messages also mention the first and the last match
line number in the following format:
FM:<first match line no.>, LM:<last match line no.>
Default: 0
*g:indexed_search_shortmess*
g:indexed_search_shortmess
If 1, the messages are (a bit) shorter.
Default: 0
*g:indexed_search_numbered_only*
g:indexed_search_numbered_only
If 1, the messages only contain the search count. No
"First of" and "Last of".
Default: 0
*g:indexed_search_n_always_searches_forward*
g:indexed_search_n_always_searches_forward
In vim, by default, the direction of n and N depends on
whether / or ? was used for searching forward or backward
respectively.
If 1, n always search forward and N backward
Default: 0
=============================================================================
MAPPINGS *indexed-search-mappings*
Indexed Search remaps the standard Vim keys /, ?, *, #, n and N, so that the
appropriate message is displayed afterwards. If you don't want that, you can
disable these mappings by letting |g:indexed_search_mappings| to 0.
=============================================================================
PERFORMANCE *indexed-search-performance*
Plugin bypasses the calculation of match index when it would take too much
time (too many matches, too large file). You can use |g:indexed_search_max_lines|
and |g:indexed_search_max_hits| to tune these performance limits.
vim:tw=78:ts=8:ft=help:norl: