/
netdict.txt
146 lines (108 loc) · 5.31 KB
/
netdict.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
*netdict.txt* Retrieve term definitions from the Internet.
N E T D I C T
1. Introduction |intro|
2. Settings |settings|
3. Mappings |mappings|
4. Commands |commands|
5. TODO |todo|
6. Copyright |copyright|
==============================================================================
1. Introduction *intro*
Netdict is a plugin to retrieve word and other definitions from the Internet
using the Unix DICT protocol client.
==============================================================================
2. Settings *settings*
The following global variables are available and may be specified in your
configuration file via the |:let| command.
*netdict_dictprg*
Specifies the command to execute dict. The default is 'dict --pager -'.
*netdict_xargs*
Specifies any extra options to pass to |netdict_dictprg|. See the dict(1)
manual page for available options. The default is empty.
*netdict_database*
The default database to search when looking up terms. If empty, the default,
search all available databases.
*netdict_strategy*
The default strategy to use when searching a database. If empty, the default,
use the servers default strategy which is normally 'exact'.
*netdict_expand*
When selecting terms with any of the cursor lookup or match plugins and this
option is set to 1, then all words enclosed in '"' or '{}' are used as the
term in all windows and not just the definition window. Otherwise only the
word under the cursor (see |<cword>|) is used as the term.
*netdict_extra_history*
Setting this to zero disables adding words selected with any of the cursor
lookup or match plugins and |commands| to the input history. The default is 1
or enabled.
==============================================================================
3. Mappings *mappings*
The following are the default key mappings. You can easily change them by
specifying the |{rhs}| of the |:map| command as one of the plugin names in
your configuration file.
*<Leader>ll*
*<Plug>NetdictLookup*
Prompt for input of a term in normal mode. If a term contains spaces or
special characters it must be enclosed in double quotes to prevent the shell
from interpreting them. You can select an alternate database and search
strategy for the term by separating them with spaces. The format for input is:
term [!|*|database [ strategy ]]
A database named '!' returns results from the first matching database only. A
database named '*' searches all available databases and is usally specified
when using an alternate search strategy. Otherwise the named database is one
available from the server. See |<Plug>NetdictShowDB|.
If you are running a version of VIM which was compiled with |+dialog_gui| then
a new window will be created prompting you for the search term which has the
same format as above.
*<Leader>lm*
*<Plug>NetdictMatch*
Display a list of possible matches for the specified term rather than
definitions.
*<Leader>ld*
*<Plug>NetdictShowDB*
Show a list of searchable databases from the server.
*<Leader>ls*
*<Plug>NetdictShowStrat*
Show a list of search strategies from the server.
*<Leader>lcl*
*<Plug>NetdictCursorLookup*
Lookup the definition of the word under the cursor (see |netdict_expand|) in
normal mode without prompting for input. If the word is a hyperlink (enclosed
in {}) or a term of possible matches from the definition window, then only
definitions for the term in the associated database will be shown.
*<Leader>lcm*
*<Plug>NetdictCursorMatch*
Lookup possible matches for the word under the cursor (see |netdict_expand|)
in normal mode without prompting for input.
*<C-T>*
Goto to the previous definition when in the definition window.
*]]* *[[*
Jump to the next or previous [count] definition or match when in the
definition window. When jumping between definitions Netdict will try and
position the match at the top of the window. If this doesn't work then it is
probably do to |'scrolloff'| being greater than zero.
*}}* *{{*
Jump to the next or previous [count] hyperlink when in the definition window.
==============================================================================
4. Commands *commands*
*:Lookup*
Like |<Plug>NetdictLookup| but without a prompt. If no arguments are given
then a prompt is displayed just as if |<Plug>NetdictLookup| were used.
Example:
:Lookup "^somet" web1913 re
would return all words from the Webster's dictionary beginning with 'somet'.
*:Match*
Like |:Lookup| but behaves like |<Plug>NetdictMatch|.
==============================================================================
5. TODO *todo*
Below are some things I'd like to see in future versions. If you have any
other suggestions feel free to let me know or send me some patches.
* multiword terms in (character) visual mode 'v'
* support multiword terms that span more than one line
* gui mouse support and syntax highlighting (I dont have a gui yet)
==============================================================================
6. Copyright *copyright*
Netdict is written by Ben Kibbey <bjk@luxsci.net> and is distributed under the
terms of the GNU General Public License.
The latest version can be found either at http://arbornet.org/~bjk/vim/ or at
VIM Online http://www.vim.org/.
vim:tw=78:ts=8: