Mercurial > vim
annotate runtime/doc/netbeans.txt @ 9751:4843c53e809a
Added tag v7.4.2150 for changeset 0f4b76b2757a4c9a17b97810a7d42510beb91877
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 03 Aug 2016 21:00:06 +0200 |
parents | 9f921133ee90 |
children | 9f48eab77d62 |
rev | line source |
---|---|
9533
9f921133ee90
commit https://github.com/vim/vim/commit/269f595f9eef584937e7eae70fde68cdd7da5bcf
Christian Brabandt <cb@256bit.org>
parents:
8951
diff
changeset
|
1 *netbeans.txt* For Vim version 7.4. Last change: 2016 Jul 15 |
7 | 2 |
3 | |
1620 | 4 VIM REFERENCE MANUAL by Gordon Prieur et al. |
7 | 5 |
6 | |
7790
ca19726d5e83
commit https://github.com/vim/vim/commit/298b440930ecece38d6ea0505a3e582dc817e79b
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
7 *netbeans* *netbeans-support* |
1620 | 8 |
9 Vim NetBeans Protocol: a socket interface for Vim integration into an IDE. | |
10 | |
7 | 11 1. Introduction |netbeans-intro| |
1620 | 12 2. Integration features |netbeans-integration| |
7 | 13 3. Configuring Vim for NetBeans |netbeans-configure| |
1620 | 14 4. Error Messages |netbeans-messages| |
15 5. Running Vim in NetBeans mode |netbeans-run| | |
16 6. NetBeans protocol |netbeans-protocol| | |
2210 | 17 7. NetBeans commands |netbeans-commands| |
1620 | 18 8. Known problems |netbeans-problems| |
19 9. Debugging NetBeans protocol |netbeans-debugging| | |
20 10. NetBeans External Editor | |
21 10.1. Downloading NetBeans |netbeans-download| | |
22 10.2. NetBeans Key Bindings |netbeans-keybindings| | |
23 10.3. Preparing NetBeans for Vim |netbeans-preparation| | |
24 10.4. Obtaining the External Editor Module |obtaining-exted| | |
25 10.5. Setting up NetBeans to run with Vim |netbeans-setup| | |
7 | 26 |
27 {Vi does not have any of these features} | |
28 {only available when compiled with the |+netbeans_intg| feature} | |
29 | |
30 ============================================================================== | |
31 1. Introduction *netbeans-intro* | |
32 | |
1620 | 33 The NetBeans interface was initially developed to integrate Vim into the |
34 NetBeans Java IDE, using the external editor plugin. This NetBeans plugin no | |
35 longer exists for recent versions of NetBeans but the protocol was developed | |
36 in such a way that any IDE can use it to integrate Vim. | |
37 | |
38 The NetBeans protocol of Vim is a text based communication protocol, over a | |
39 classical TCP socket. There is no dependency on Java or NetBeans. Any language | |
40 or environment providing a socket interface can control Vim using this | |
41 protocol. There are existing implementations in C, C++, Python and Java. The | |
42 name NetBeans is kept today for historical reasons. | |
43 | |
44 Current projects using the NetBeans protocol of Vim are: | |
45 - VimIntegration, description of various projects doing Vim Integration: | |
46 http://www.freehackers.org/VimIntegration | |
47 - Agide, an IDE for the AAP project, written in Python: | |
48 http://www.a-a-p.org | |
49 - Clewn, a gdb integration into Vim, written in C: | |
50 http://clewn.sourceforge.net/ | |
2210 | 51 - Pyclewn, a gdb integration into Vim, written in Python: |
52 http://pyclewn.sourceforge.net/ | |
1620 | 53 - VimPlugin, integration of Vim inside Eclipse: |
54 http://vimplugin.sourceforge.net/wiki/pmwiki.php | |
55 - PIDA, IDE written in Python integrating Vim: | |
56 http://pida.co.uk/ | |
57 - VimWrapper, library to easy Vim integration into IDE: | |
58 http://www.freehackers.org/VimWrapper | |
59 | |
60 Check the specific project pages to see how to use Vim with these projects. | |
61 | |
9533
9f921133ee90
commit https://github.com/vim/vim/commit/269f595f9eef584937e7eae70fde68cdd7da5bcf
Christian Brabandt <cb@256bit.org>
parents:
8951
diff
changeset
|
62 An alternative is to use a channel, see |channel|. |
9f921133ee90
commit https://github.com/vim/vim/commit/269f595f9eef584937e7eae70fde68cdd7da5bcf
Christian Brabandt <cb@256bit.org>
parents:
8951
diff
changeset
|
63 |
1620 | 64 In the rest of this help page, we will use the term "Vim Controller" to |
65 describe the program controlling Vim through the NetBeans socket interface. | |
66 | |
67 | |
68 About the NetBeans IDE ~ | |
69 | |
7 | 70 NetBeans is an open source Integrated Development Environment developed |
71 jointly by Sun Microsystems, Inc. and the netbeans.org developer community. | |
72 Initially just a Java IDE, NetBeans has had C, C++, and Fortran support added | |
73 in recent releases. | |
74 | |
1620 | 75 For more information visit the main NetBeans web site http://www.netbeans.org. |
1668 | 76 The External Editor is now, unfortunately, declared obsolete. See |
1620 | 77 http://externaleditor.netbeans.org. |
7 | 78 |
79 Sun Microsystems, Inc. also ships NetBeans under the name Sun ONE Studio. | |
80 Visit http://www.sun.com for more information regarding the Sun ONE Studio | |
81 product line. | |
82 | |
83 Current releases of NetBeans provide full support for Java and limited support | |
236 | 84 for C, C++, and Fortran. Current releases of Sun ONE Studio provide full |
7 | 85 support for Java, C, C++, and Fortran. |
86 | |
87 ============================================================================== | |
1620 | 88 2. Integration features *netbeans-integration* |
7 | 89 |
1620 | 90 The NetBeans socket interface of Vim allows to get information from Vim or to |
91 ask Vim to perform specific actions: | |
92 - get information about buffer: buffer name, cursor position, buffer content, | |
93 etc. | |
94 - be notified when buffers are open or closed | |
95 - be notified of how the buffer content is modified | |
96 - load and save files | |
97 - modify the buffer content | |
98 - installing special key bindings | |
99 - raise the window, control the window geometry | |
7 | 100 |
1620 | 101 For sending key strokes to Vim or for evaluating functions in Vim, you must |
102 use the |clientserver| interface. | |
7 | 103 |
104 | |
105 ============================================================================== | |
106 3. Configuring Vim for NetBeans *netbeans-configure* | |
107 | |
2207
b17bbfa96fa0
Add the settabvar() and gettabvar() functions.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
108 For more help about installing Vim, please read |usr_90.txt| in the Vim User |
b17bbfa96fa0
Add the settabvar() and gettabvar() functions.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
109 Manual. |
7 | 110 |
111 | |
1620 | 112 On Unix: |
113 -------- | |
7 | 114 |
115 When running configure without arguments the NetBeans interface should be | |
116 included. That is, if the configure check to find out if your system supports | |
117 the required features succeeds. | |
118 | |
119 In case you do not want the NetBeans interface you can disable it by | |
120 uncommenting a line with "--disable-netbeans" in the Makefile. | |
121 | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
122 Currently the NetBeans interface is supported by Vim running in a terminal and |
2592 | 123 by GVim when it is run with one of the following GUIs: GTK, GNOME, Windows, |
124 Athena and Motif. | |
7 | 125 |
236 | 126 If Motif support is required the user must supply XPM libraries. See |
7 | 127 |workshop-xpm| for details on obtaining the latest version of XPM. |
128 | |
129 | |
1620 | 130 On MS-Windows: |
131 -------------- | |
7 | 132 |
133 The Win32 support is now in beta stage. | |
134 | |
135 To use XPM signs on Win32 (e.g. when using with NetBeans) you can compile | |
136 XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/misc/ | |
137 (for MS Visual C++) or http://gnuwin32.sourceforge.net (for MinGW). | |
138 | |
1620 | 139 Enable debugging: |
140 ----------------- | |
7 | 141 |
1620 | 142 To enable debugging of Vim and of the NetBeans protocol, the "NBDEBUG" macro |
143 needs to be defined. Search in the Makefile of the platform you are using for | |
144 "NBDEBUG" to see what line needs to be uncommented. This effectively adds | |
145 "-DNBDEBUG" to the compile command. Also see |netbeans-debugging| | |
7 | 146 |
147 ============================================================================== | |
1620 | 148 4. Error Messages *netbeans-messages* |
7 | 149 |
1620 | 150 These error messages are specific to NetBeans socket protocol: |
7 | 151 |
152 *E463* | |
153 Region is guarded, cannot modify | |
1620 | 154 The Vim Controller has defined guarded areas in the text, |
155 which you cannot change. Also sets the current buffer, if | |
156 necessary. | |
7 | 157 |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
158 *E532* |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
159 The defineAnnoType highlighting color name is too long |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
160 The maximum length of the "fg" or "bg" color argument in the |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
161 defineAnnoType command is 32 characters. |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
162 New in version 2.5. |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
163 |
7 | 164 *E656* |
1620 | 165 Writes of unmodified buffers forbidden |
166 Writes of unmodified buffers that were opened from the | |
167 Vim Controller are not possible. | |
7 | 168 |
169 *E657* | |
1620 | 170 Partial writes disallowed |
171 Partial writes for buffers that were opened from the | |
172 Vim Controller are not allowed. | |
7 | 173 |
174 *E658* | |
1620 | 175 Connection lost for this buffer |
176 The Vim Controller has become confused about the state of | |
177 this file. Rather than risk data corruption, it has severed | |
178 the connection for this file. Vim will take over | |
179 responsibility for saving changes to this file and the | |
180 Vim Controller will no longer know of these changes. | |
7 | 181 |
146 | 182 *E744* |
1620 | 183 Read-only file |
146 | 184 Vim normally allows changes to a read-only file and only |
185 enforces the read-only rule if you try to write the file. | |
186 However, NetBeans does not let you make changes to a file | |
1620 | 187 which is read-only and becomes confused if Vim does this. |
188 So Vim does not allow modifications to files when run | |
189 in NetBeans mode. | |
190 | |
7 | 191 ============================================================================== |
1620 | 192 5. Running Vim in NetBeans mode *netbeans-run* |
7 | 193 |
2210 | 194 There are two different ways to run Vim in NetBeans mode: |
195 | |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
196 + an IDE may start Vim with the |-nb| command line argument |
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
197 + NetBeans can be started from within Vim with the |:nbstart| command |
2210 | 198 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7876
diff
changeset
|
199 Vim uses a 3 second timeout on trying to make the connection. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7876
diff
changeset
|
200 |
2210 | 201 *netbeans-parameters* |
202 Three forms can be used to setup the NetBeans connection parameters. | |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
203 When started from the command line, the |-nb| command line argument may be: |
7 | 204 |
205 -nb={fname} from a file | |
206 -nb:{hostname}:{addr}:{password} directly | |
207 -nb from a file or environment | |
208 | |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
209 When started from within Vim, the |:nbstart| optional argument may be: |
2210 | 210 |
211 ={fname} from a file | |
212 :{hostname}:{addr}:{password} directly | |
213 <MISSING ARGUMENT> from a file or environment | |
214 | |
7 | 215 *E660* *E668* |
2210 | 216 When NetBeans is started from the command line, for security reasons, the best |
217 method is to write the information in a file readable only by the user. The | |
218 name of the file can be passed with the "-nb={fname}" argument or, when "-nb" | |
219 is used without a parameter, the environment variable "__NETBEANS_CONINFO". | |
220 The file must contain these three lines, in any order: | |
7 | 221 |
222 host={hostname} | |
223 port={addr} | |
224 auth={password} | |
225 | |
2210 | 226 Other lines are ignored. The Vim Controller is responsible for deleting the |
7 | 227 file afterwards. |
228 | |
1620 | 229 {hostname} is the name of the machine where Vim Controller is running. When |
230 omitted the environment variable "__NETBEANS_HOST" is used or the default | |
231 "localhost". | |
7 | 232 |
1620 | 233 {addr} is the port number for the NetBeans interface. When omitted the |
234 environment variable "__NETBEANS_SOCKET" is used or the default 3219. | |
7 | 235 |
236 {password} is the password for connecting to NetBeans. When omitted the | |
237 environment variable "__NETBEANS_VIM_PASSWORD" is used or "changeme". | |
238 | |
1620 | 239 Vim will initiate a socket connection (client side) to the specified host and |
240 port upon startup. The password will be sent with the AUTH event when the | |
241 connection has been established. | |
242 | |
7 | 243 |
1620 | 244 ============================================================================== |
245 6. NetBeans protocol *netbeans-protocol* | |
246 | |
247 The communication between the Vim Controller and Vim uses plain text | |
248 messages. This protocol was first designed to work with the external editor | |
249 module of NetBeans. Later it was extended to work with Agide (A-A-P GUI IDE, | |
250 see http://www.a-a-p.org) and then with other IDE. The extensions are marked | |
251 with "version 2.1". | |
7 | 252 |
236 | 253 Version 2.2 of the protocol has several minor changes which should only affect |
254 NetBeans users (ie, not Agide users). However, a bug was fixed which could | |
255 cause confusion. The netbeans_saved() function sent a "save" protocol | |
256 command. In protocol version 2.1 and earlier this was incorrectly interpreted | |
257 as a notification that a write had taken place. In reality, it told NetBeans | |
258 to save the file so multiple writes were being done. This caused various | |
259 problems and has been fixed in 2.2. To decrease the likelihood of this | |
7 | 260 confusion happening again, netbeans_saved() has been renamed to |
261 netbeans_save_buffer(). | |
262 | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
263 We are now at version 2.5. For the differences between 2.4 and 2.5 search for |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
264 "2.5" below. |
718 | 265 |
7 | 266 The messages are currently sent over a socket. Since the messages are in |
267 plain UTF-8 text this protocol could also be used with any other communication | |
268 mechanism. | |
269 | |
3151 | 270 Netbeans messages are processed when Vim is idle, waiting for user input. |
271 When Vim is run in non-interactive mode, for example when running an automated | |
272 test case that sources a Vim script, the idle loop may not be called often | |
3312 | 273 enough. In that case, insert |:sleep| commands in the Vim script. The |:sleep| |
3151 | 274 command does invoke Netbeans messages processing. |
275 | |
1620 | 276 6.1 Kinds of messages |nb-messages| |
277 6.2 Terms |nb-terms| | |
278 6.3 Commands |nb-commands| | |
279 6.4 Functions and Replies |nb-functions| | |
280 6.5 Events |nb-events| | |
281 6.6 Special messages |nb-special| | |
282 6.7 Protocol errors |nb-protocol_errors| | |
718 | 283 |
284 | |
1620 | 285 6.1 Kinds of messages *nb-messages* |
7 | 286 |
287 There are four kinds of messages: | |
288 | |
289 kind direction comment ~ | |
290 Command IDE -> editor no reply necessary | |
291 Function IDE -> editor editor must send back a reply | |
292 Reply editor -> IDE only in response to a Function | |
293 Event editor -> IDE no reply necessary | |
294 | |
295 The messages are sent as a single line with a terminating newline character. | |
296 Arguments are separated by a single space. The first item of the message | |
297 depends on the kind of message: | |
298 | |
299 kind first item example ~ | |
300 Command bufID:name!seqno 11:showBalloon!123 "text" | |
301 Function bufID:name/seqno 11:getLength/123 | |
302 Reply seqno 123 5000 | |
1620 | 303 Event bufID:name=seqno 11:keyCommand=123 "S-F2" |
7 | 304 |
305 | |
1620 | 306 |
307 6.2 Terms *nb-terms* | |
7 | 308 |
309 bufID Buffer number. A message may be either for a specific buffer | |
310 or generic. Generic messages use a bufID of zero. NOTE: this | |
311 buffer ID is assigned by the IDE, it is not Vim's buffer | |
312 number. The bufID must be a sequentially rising number, | |
6697 | 313 starting at one. When the 'switchbuf' option is set to |
314 "usetab" and the "bufID" buffer is not found in the current | |
315 tab page, the netbeans commands and functions that set this | |
316 buffer as the current buffer will jump to the first open | |
317 window that contains this buffer in other tab pages instead of | |
318 replacing the buffer in the current window. | |
7 | 319 |
320 seqno The IDE uses a sequence number for Commands and Functions. A | |
321 Reply must use the sequence number of the Function that it is | |
322 associated with. A zero sequence number can be used for | |
323 Events (the seqno of the last received Command or Function can | |
324 also be used). | |
325 | |
326 string Argument in double quotes. Text is in UTF-8 encoding. This | |
327 means ASCII is passed as-is. Special characters are | |
328 represented with a backslash: | |
329 \" double quote | |
330 \n newline | |
331 \r carriage-return | |
332 \t tab (optional, also works literally) | |
333 \\ backslash | |
334 NUL bytes are not allowed! | |
335 | |
336 boolean Argument with two possible values: | |
337 T true | |
338 F false | |
339 | |
340 number Argument with a decimal number. | |
341 | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
342 color Argument with either a decimal number, "none" (without the |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
343 quotes) or the name of a color (without the quotes) defined |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
344 both in the color list in |highlight-ctermfg| and in the color |
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
345 list in |gui-colors|. |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
346 New in version 2.5. |
7 | 347 |
348 offset A number argument that indicates a byte position in a buffer. | |
349 The first byte has offset zero. Line breaks are counted for | |
350 how they appear in the file (CR/LF counts for two bytes). | |
351 Note that a multi-byte character is counted for the number of | |
352 bytes it takes. | |
353 | |
354 lnum/col Argument with a line number and column number position. The | |
355 line number starts with one, the column is the byte position, | |
356 starting with zero. Note that a multi-byte character counts | |
357 for several columns. | |
358 | |
359 pathname String argument: file name with full path. | |
360 | |
361 | |
1620 | 362 6.3 Commands *nb-commands* |
7 | 363 |
364 actionMenuItem Not implemented. | |
365 | |
366 actionSensitivity | |
367 Not implemented. | |
368 | |
369 addAnno serNum typeNum off len | |
370 Place an annotation in this buffer. | |
371 Arguments: | |
372 serNum number serial number of this placed | |
373 annotation, used to be able to remove | |
374 it | |
375 typeNum number sequence number of the annotation | |
376 defined with defineAnnoType for this | |
377 buffer | |
378 off number offset where annotation is to be placed | |
379 len number not used | |
380 In version 2.1 "lnum/col" can be used instead of "off". | |
381 | |
382 balloonResult text | |
383 Not implemented. | |
384 | |
385 close Close the buffer. This leaves us without current buffer, very | |
386 dangerous to use! | |
387 | |
388 create Creates a buffer without a name. Replaces the current buffer | |
389 (it's hidden when it was changed). | |
1620 | 390 The Vim Controller should use this as the first command for a |
391 file that is being opened. The sequence of commands could be: | |
7 | 392 create |
393 setCaretListener (ignored) | |
394 setModified (no effect) | |
395 setContentType (ignored) | |
396 startDocumentListen | |
397 setTitle | |
398 setFullName | |
399 | |
400 defineAnnoType typeNum typeName tooltip glyphFile fg bg | |
401 Define a type of annotation for this buffer. | |
402 Arguments: | |
403 typeNum number sequence number (not really used) | |
404 typeName string name that identifies this annotation | |
405 tooltip string not used | |
406 glyphFile string name of icon file | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
407 fg color foreground color for line highlighting |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
408 bg color background color for line highlighting |
7 | 409 Vim will define a sign for the annotation. |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
410 When color is a number, this is the "#rrggbb" Red, Green and |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
411 Blue values of the color (see |gui-colors|) and the |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
412 highlighting is only defined for GVim. |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
413 When color is a name, this color is defined both for Vim |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
414 running in a color terminal and for GVim. |
7 | 415 When both "fg" and "bg" are "none" no line highlighting is |
416 used (new in version 2.1). | |
417 When "glyphFile" is empty, no text sign is used (new in | |
418 version 2.1). | |
419 When "glyphFile" is one or two characters long, a text sign is | |
420 defined (new in version 2.1). | |
421 Note: the annotations will be defined in sequence, and the | |
422 sequence number is later used with addAnno. | |
423 | |
424 editFile pathname | |
425 Set the name for the buffer and edit the file "pathname", a | |
426 string argument. | |
1620 | 427 Normal way for the IDE to tell the editor to edit a file. |
428 | |
429 You must set a bufId different of 0 with this command to | |
430 assign a bufId to the buffer. It will trigger an event | |
431 fileOpened with a bufId of 0 but the buffer has been assigned. | |
432 | |
433 If the IDE is going to pass the file text to the editor use | |
434 these commands instead: | |
7 | 435 setFullName |
436 insert | |
437 initDone | |
438 New in version 2.1. | |
439 | |
440 enableBalloonEval | |
441 Not implemented. | |
442 | |
443 endAtomic End an atomic operation. The changes between "startAtomic" | |
444 and "endAtomic" can be undone as one operation. But it's not | |
445 implemented yet. Redraw when necessary. | |
446 | |
447 guard off len | |
448 Mark an area in the buffer as guarded. This means it cannot | |
449 be edited. "off" and "len" are numbers and specify the text | |
450 to be guarded. | |
451 | |
452 initDone Mark the buffer as ready for use. Implicitly makes the buffer | |
453 the current buffer. Fires the BufReadPost autocommand event. | |
454 | |
33 | 455 insertDone |
1620 | 456 Sent by Vim Controller to tell Vim an initial file insert is |
457 done. This triggers a read message being printed. Prior to | |
458 version 2.3, no read messages were displayed after opening a | |
459 file. New in version 2.3. | |
33 | 460 |
7 | 461 moveAnnoToFront serNum |
462 Not implemented. | |
463 | |
464 netbeansBuffer isNetbeansBuffer | |
1668 | 465 If "isNetbeansBuffer" is "T" then this buffer is "owned" by |
7 | 466 NetBeans. |
467 New in version 2.2. | |
468 | |
469 putBufferNumber pathname | |
470 Associate a buffer number with the Vim buffer by the name | |
471 "pathname", a string argument. To be used when the editor | |
472 reported editing another file to the IDE and the IDE needs to | |
473 tell the editor what buffer number it will use for this file. | |
474 Also marks the buffer as initialized. | |
475 New in version 2.1. | |
476 | |
477 raise Bring the editor to the foreground. | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
478 Only when Vim is run with a GUI. |
7 | 479 New in version 2.1. |
480 | |
481 removeAnno serNum | |
6259 | 482 Remove a previously placed annotation for this buffer. |
7 | 483 "serNum" is the same number used in addAnno. |
484 | |
485 save Save the buffer when it was modified. The other side of the | |
486 interface is expected to write the buffer and invoke | |
487 "setModified" to reset the "changed" flag of the buffer. | |
488 The writing is skipped when one of these conditions is true: | |
489 - 'write' is not set | |
490 - the buffer is read-only | |
491 - the buffer does not have a file name | |
492 - 'buftype' disallows writing | |
493 New in version 2.2. | |
494 | |
33 | 495 saveDone |
1620 | 496 Sent by Vim Controller to tell Vim a save is done. This |
497 triggers a save message being printed. Prior to version 2.3, | |
498 no save messages were displayed after a save. | |
33 | 499 New in version 2.3. |
500 | |
7 | 501 setAsUser Not implemented. |
502 | |
503 setBufferNumber pathname | |
504 Associate a buffer number with Vim buffer by the name | |
505 "pathname". To be used when the editor reported editing | |
506 another file to the IDE and the IDE needs to tell the editor | |
507 what buffer number it will use for this file. | |
508 Has the side effect of making the buffer the current buffer. | |
509 See "putBufferNumber" for a more useful command. | |
510 | |
511 setContentType | |
512 Not implemented. | |
513 | |
514 setDot off Make the buffer the current buffer and set the cursor at the | |
659 | 515 specified position. If the buffer is open in another window |
516 than make that window the current window. | |
517 If there are folds they are opened to make the cursor line | |
518 visible. | |
7 | 519 In version 2.1 "lnum/col" can be used instead of "off". |
520 | |
521 setExitDelay seconds | |
522 Set the delay for exiting to "seconds", a number. | |
523 This delay is used to give the IDE a chance to handle things | |
524 before really exiting. The default delay is two seconds. | |
525 New in version 2.1. | |
33 | 526 Obsolete in version 2.3. |
7 | 527 |
528 setFullName pathname | |
529 Set the file name to be used for a buffer to "pathname", a | |
530 string argument. | |
531 Used when the IDE wants to edit a file under control of the | |
532 IDE. This makes the buffer the current buffer, but does not | |
533 read the file. "insert" commands will be used next to set the | |
534 contents. | |
535 | |
536 setLocAndSize Not implemented. | |
537 | |
538 setMark Not implemented. | |
539 | |
540 setModified modified | |
541 When the boolean argument "modified" is "T" mark the buffer as | |
542 modified, when it is "F" mark it as unmodified. | |
543 | |
33 | 544 setModtime time |
1620 | 545 Update a buffers modification time after the file has been |
546 saved directly by the Vim Controller. | |
33 | 547 New in version 2.3. |
548 | |
549 setReadOnly | |
1620 | 550 Set a file as readonly |
551 Implemented in version 2.3. | |
7 | 552 |
553 setStyle Not implemented. | |
554 | |
555 setTitle name | |
556 Set the title for the buffer to "name", a string argument. | |
1620 | 557 The title is only used for the Vim Controller functions, not |
558 by Vim. | |
7 | 559 |
560 setVisible visible | |
561 When the boolean argument "visible" is "T", goto the buffer. | |
562 The "F" argument does nothing. | |
563 | |
564 showBalloon text | |
565 Show a balloon (popup window) at the mouse pointer position, | |
566 containing "text", a string argument. The balloon should | |
567 disappear when the mouse is moved more than a few pixels. | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
568 Only when Vim is run with a GUI. |
7 | 569 New in version 2.1. |
570 | |
33 | 571 specialKeys |
572 Map a set of keys (mostly function keys) to be passed back | |
1620 | 573 to the Vim Controller for processing. This lets regular IDE |
574 hotkeys be used from Vim. | |
33 | 575 Implemented in version 2.3. |
7 | 576 |
577 startAtomic Begin an atomic operation. The screen will not be updated | |
578 until "endAtomic" is given. | |
579 | |
580 startCaretListen | |
581 Not implemented. | |
582 | |
583 startDocumentListen | |
584 Mark the buffer to report changes to the IDE with the | |
585 "insert" and "remove" events. The default is to report | |
586 changes. | |
587 | |
588 stopCaretListen | |
589 Not implemented. | |
590 | |
591 stopDocumentListen | |
592 Mark the buffer to stop reporting changes to the IDE. | |
593 Opposite of startDocumentListen. | |
153 | 594 NOTE: if "netbeansBuffer" was used to mark this buffer as a |
595 NetBeans buffer, then the buffer is deleted in Vim. This is | |
596 for compatibility with Sun Studio 10. | |
7 | 597 |
598 unguard off len | |
599 Opposite of "guard", remove guarding for a text area. | |
659 | 600 Also sets the current buffer, if necessary. |
7 | 601 |
602 version Not implemented. | |
603 | |
604 | |
1620 | 605 6.4 Functions and Replies *nb-functions* |
7 | 606 |
607 getDot Not implemented. | |
608 | |
609 getCursor Return the current buffer and cursor position. | |
610 The reply is: | |
611 seqno bufID lnum col off | |
612 seqno = sequence number of the function | |
613 bufID = buffer ID of the current buffer (if this is unknown -1 | |
614 is used) | |
615 lnum = line number of the cursor (first line is one) | |
616 col = column number of the cursor (in bytes, zero based) | |
617 off = offset of the cursor in the buffer (in bytes) | |
618 New in version 2.1. | |
619 | |
620 getLength Return the length of the buffer in bytes. | |
621 Reply example for a buffer with 5000 bytes: | |
622 123 5000 | |
623 TODO: explain use of partial line. | |
624 | |
625 getMark Not implemented. | |
626 | |
1037 | 627 getAnno serNum |
628 Return the line number of the annotation in the buffer. | |
629 Argument: | |
630 serNum serial number of this placed annotation | |
631 The reply is: | |
632 123 lnum line number of the annotation | |
633 123 0 invalid annotation serial number | |
634 New in version 2.4. | |
635 | |
7 | 636 getModified When a buffer is specified: Return zero if the buffer does not |
637 have changes, one if it does have changes. | |
638 When no buffer is specified (buffer number zero): Return the | |
639 number of buffers with changes. When the result is zero it's | |
640 safe to tell Vim to exit. | |
641 New in version 2.1. | |
642 | |
643 getText Return the contents of the buffer as a string. | |
644 Reply example for a buffer with two lines | |
645 123 "first line\nsecond line\n" | |
646 NOTE: docs indicate an offset and length argument, but this is | |
647 not implemented. | |
648 | |
649 insert off text | |
650 Insert "text" before position "off". "text" is a string | |
651 argument, "off" a number. | |
1620 | 652 "text" should have a "\n" (newline) at the end of each line. |
718 | 653 Or "\r\n" when 'fileformat' is "dos". When using "insert" in |
654 an empty buffer Vim will set 'fileformat' accordingly. | |
655 When "off" points to the start of a line the text is inserted | |
656 above this line. Thus when "off" is zero lines are inserted | |
657 before the first line. | |
658 When "off" points after the start of a line, possibly on the | |
659 NUL at the end of a line, the first line of text is appended | |
660 to this line. Further lines come below it. | |
7 | 661 Possible replies: |
662 123 no problem | |
663 123 !message failed | |
664 Note that the message in the reply is not quoted. | |
659 | 665 Also sets the current buffer, if necessary. |
718 | 666 Does not move the cursor to the changed text. |
667 Resets undo information. | |
7 | 668 |
669 remove off length | |
670 Delete "length" bytes of text at position "off". Both | |
671 arguments are numbers. | |
672 Possible replies: | |
673 123 no problem | |
674 123 !message failed | |
675 Note that the message in the reply is not quoted. | |
659 | 676 Also sets the current buffer, if necessary. |
7 | 677 |
678 saveAndExit Perform the equivalent of closing Vim: ":confirm qall". | |
679 If there are no changed files or the user does not cancel the | |
680 operation Vim exits and no result is sent back. The IDE can | |
681 consider closing the connection as a successful result. | |
682 If the user cancels the operation the number of modified | |
683 buffers that remains is returned and Vim does not exit. | |
684 New in version 2.1. | |
685 | |
686 | |
1620 | 687 6.5 Events *nb-events* |
7 | 688 |
689 balloonEval off len type | |
690 The mouse pointer rests on text for a short while. When "len" | |
691 is zero, there is no selection and the pointer is at position | |
692 "off". When "len" is non-zero the text from position "off" to | |
693 "off" + "len" is selected. | |
694 Only sent after "enableBalloonEval" was used for this buffer. | |
695 "type" is not yet defined. | |
696 Not implemented yet. | |
697 | |
698 balloonText text | |
699 Used when 'ballooneval' is set and the mouse pointer rests on | |
700 some text for a moment. "text" is a string, the text under | |
701 the mouse pointer. | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
702 Only when Vim is run with a GUI. |
7 | 703 New in version 2.1. |
704 | |
705 buttonRelease button lnum col | |
706 Report which button was pressed and the location of the cursor | |
707 at the time of the release. Only for buffers that are owned | |
1620 | 708 by the Vim Controller. This event is not sent if the button |
709 was released while the mouse was in the status line or in a | |
236 | 710 separator line. If col is less than 1 the button release was |
7 | 711 in the sign area. |
712 New in version 2.2. | |
713 | |
33 | 714 disconnect |
1620 | 715 Tell the Vim Controller that Vim is exiting and not to try and |
716 read or write more commands. | |
33 | 717 New in version 2.3. |
718 | |
7 | 719 fileClosed Not implemented. |
720 | |
721 fileModified Not implemented. | |
722 | |
723 fileOpened pathname open modified | |
724 A file was opened by the user. | |
725 Arguments: | |
726 pathname string name of the file | |
727 open boolean always "T" | |
728 modified boolean always "F" | |
729 | |
730 geometry cols rows x y | |
731 Report the size and position of the editor window. | |
732 Arguments: | |
733 cols number number of text columns | |
734 rows number number of text rows | |
735 x number pixel position on screen | |
736 y number pixel position on screen | |
737 Only works for Motif. | |
738 | |
739 insert off text | |
740 Text "text" has been inserted in Vim at position "off". | |
741 Only fired when enabled, see "startDocumentListen". | |
742 | |
743 invokeAction Not implemented. | |
744 | |
745 keyCommand keyName | |
746 Reports a special key being pressed with name "keyName", which | |
747 is a string. | |
748 Supported key names: | |
749 F1 function key 1 | |
750 F2 function key 2 | |
751 ... | |
752 F12 function key 12 | |
753 | |
754 ' ' space (without the quotes) | |
755 ! exclamation mark | |
756 ... any other ASCII printable character | |
757 ~ tilde | |
758 | |
759 X any unrecognized key | |
760 | |
761 The key may be prepended by "C", "S" and/or "M" for Control, | |
762 Shift and Meta (Alt) modifiers. If there is a modifier a dash | |
763 is used to separate it from the key name. For example: | |
764 "C-F2". | |
765 ASCII characters are new in version 2.1. | |
766 | |
767 keyAtPos keyName lnum/col | |
768 Like "keyCommand" and also report the line number and column | |
769 of the cursor. | |
770 New in version 2.1. | |
771 | |
1781 | 772 killed A file was deleted or wiped out by the user and the buffer |
773 annotations have been removed. The bufID number for this | |
774 buffer has become invalid. Only for files that have been | |
775 assigned a bufID number by the IDE. | |
7 | 776 |
777 newDotAndMark off off | |
778 Reports the position of the cursor being at "off" bytes into | |
779 the buffer. Only sent just before a "keyCommand" event. | |
780 | |
781 quit Not implemented. | |
782 | |
783 remove off len | |
784 Text was deleted in Vim at position "off" with byte length | |
785 "len". | |
786 Only fired when enabled, see "startDocumentListen". | |
787 | |
788 revert Not implemented. | |
789 | |
790 save The buffer has been saved and is now unmodified. | |
791 Only fired when enabled, see "startDocumentListen". | |
792 | |
793 startupDone The editor has finished its startup work and is ready for | |
794 editing files. | |
795 New in version 2.1. | |
796 | |
797 unmodified The buffer is now unmodified. | |
798 Only fired when enabled, see "startDocumentListen". | |
799 | |
800 version vers Report the version of the interface implementation. Vim | |
1620 | 801 reports "2.4" (including the quotes). |
7 | 802 |
803 | |
1620 | 804 6.6 Special messages *nb-special* |
7 | 805 |
806 These messages do not follow the style of the messages above. They are | |
807 terminated by a newline character. | |
808 | |
809 ACCEPT Not used. | |
810 | |
811 AUTH password editor -> IDE: First message that the editor sends to the IDE. | |
812 Must contain the password for the socket server, as specified | |
813 with the |-nb| argument. No quotes are used! | |
814 | |
815 DISCONNECT IDE -> editor: break the connection. The editor will exit. | |
816 The IDE must only send this message when there are no unsaved | |
817 changes! | |
818 | |
819 DETACH IDE -> editor: break the connection without exiting the | |
820 editor. Used when the IDE exits without bringing down the | |
821 editor as well. | |
822 New in version 2.1. | |
823 | |
824 REJECT Not used. | |
825 | |
1620 | 826 |
827 6.7 Protocol errors *nb-protocol_errors* | |
828 | |
829 These errors occur when a message violates the protocol: | |
7876
93f747af7b58
commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents:
7790
diff
changeset
|
830 *E627* *E628* *E629* *E632* *E633* *E634* *E635* *E636* |
1620 | 831 *E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646* |
8951
0bdeaf7092bc
commit https://github.com/vim/vim/commit/aa3b15dbebf333282503d6031e2f9ba6ee4398ed
Christian Brabandt <cb@256bit.org>
parents:
8148
diff
changeset
|
832 *E647* *E648* *E649* *E650* *E651* *E652* |
1620 | 833 |
834 | |
7 | 835 ============================================================================== |
2210 | 836 7. NetBeans commands *netbeans-commands* |
837 | |
2596 | 838 *:nbstart* *E511* *E838* |
2210 | 839 :nbs[tart] {connection} Start a new Netbeans session with {connection} as the |
840 socket connection parameters. The format of | |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
841 {connection} is described in |netbeans-parameters|. |
2210 | 842 At any time, one may check if the netbeans socket is |
843 connected by running the command: | |
844 ':echo has("netbeans_enabled")' | |
845 | |
846 *:nbclose* | |
847 :nbc[lose] Close the current NetBeans session. Remove all placed | |
848 signs. | |
146 | 849 |
850 *:nbkey* | |
3151 | 851 :nb[key] {key} Pass the {key} to the Vim Controller for processing. |
852 When a hot-key has been installed with the specialKeys | |
853 command, this command can be used to generate a hotkey | |
854 message to the Vim Controller. | |
855 This command can also be used to pass any text to the | |
856 Vim Controller. It is used by Pyclewn, for example, | |
857 to build the complete set of gdb commands as Vim user | |
858 commands. | |
859 The events newDotAndMark, keyCommand and keyAtPos are | |
860 generated (in this order). | |
1620 | 861 |
146 | 862 |
863 ============================================================================== | |
1620 | 864 8. Known problems *netbeans-problems* |
7 | 865 |
866 NUL bytes are not possible. For editor -> IDE they will appear as NL | |
867 characters. For IDE -> editor they cannot be inserted. | |
868 | |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
869 A NetBeans session may be initiated with Vim running in a terminal, and |
2337
a0f87fc19d1d
Better conceal in help. (partly by Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2210
diff
changeset
|
870 continued later in a GUI environment after running the |:gui| command. In this |
2209
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
871 case, the highlighting defined for the NetBeans annotations may be cleared |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
872 when the ":gui" command sources .gvimrc and this file loads a colorscheme |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
873 that runs the command ":highlight clear". |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
874 New in version 2.5. |
d0ddf7ba1630
Included the patch to support netbeans in a terminal.
Bram Moolenaar <bram@vim.org>
parents:
2207
diff
changeset
|
875 |
7 | 876 |
1620 | 877 ============================================================================== |
878 9. Debugging NetBeans protocol *netbeans-debugging* | |
879 | |
880 To debug the Vim protocol, you must first compile Vim with debugging support | |
881 and NetBeans debugging support. See |netbeans-configure| for instructions | |
882 about Vim compiling and how to enable debug support. | |
883 | |
884 When running Vim, set the following environment variables: | |
885 | |
886 export SPRO_GVIM_DEBUG=netbeans.log | |
887 export SPRO_GVIM_DLEVEL=0xffffffff | |
888 | |
889 Vim will then log all the incoming and outgoing messages of the NetBeans | |
890 protocol to the file netbeans.log . | |
891 | |
892 The content of netbeans.log after a session looks like this: | |
893 Tue May 20 17:19:27 2008 | |
894 EVT: 0:startupDone=0 | |
895 CMD 1: (1) create | |
896 CMD 2: (1) setTitle "testfile1.txt" | |
897 CMD 3: (1) setFullName "testfile1.txt" | |
898 EVT(suppressed): 1:remove=3 0 -1 | |
899 EVT: 1:fileOpened=0 "d:\\work\\vimWrapper\\vimWrapper2\\pyvimwrapper\\tests\\testfile1.txt" T F | |
900 CMD 4: (1) initDone | |
901 FUN 5: (0) getCursor | |
902 REP 5: 1 1 0 0 | |
903 CMD 6: (2) create | |
904 CMD 7: (2) setTitle "testfile2.txt" | |
905 CMD 8: (2) setFullName "testfile2.txt" | |
906 EVT(suppressed): 2:remove=8 0 -1 | |
907 EVT: 2:fileOpened=0 "d:\\work\\vimWrapper\\vimWrapper2\\pyvimwrapper\\tests\\testfile2.txt" T F | |
908 CMD 9: (2) initDone | |
909 | |
910 | |
911 ============================================================================== | |
912 10. NetBeans External Editor | |
913 | |
914 NOTE: This information is obsolete! Only relevant if you are using an old | |
915 version of NetBeans. | |
916 | |
917 | |
918 10.1. Downloading NetBeans *netbeans-download* | |
919 | |
920 The NetBeans IDE is available for download from netbeans.org. You can download | |
921 a released version, download sources, or use CVS to download the current | |
922 source tree. If you choose to download sources, follow directions from | |
923 netbeans.org on building NetBeans. | |
924 | |
925 Depending on the version of NetBeans you download, you may need to do further | |
926 work to get the required External Editor module. This is the module which lets | |
927 NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org | |
928 for details on downloading this module if your NetBeans release does not have | |
929 it. | |
930 | |
931 For C, C++, and Fortran support you will also need the cpp module. See | |
932 http://cpp.netbeans.org for information regarding this module. | |
933 | |
934 You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day | |
935 free trial. See http://www.sun.com for further details. | |
936 | |
937 | |
938 10.2. NetBeans Key Bindings *netbeans-keybindings* | |
939 | |
940 Vim understands a number of key bindings that execute NetBeans commands. | |
941 These are typically all the Function key combinations. To execute a NetBeans | |
942 command, the user must press the Pause key followed by a NetBeans key binding. | |
943 For example, in order to compile a Java file, the NetBeans key binding is | |
944 "F9". So, while in vim, press "Pause F9" to compile a java file. To toggle a | |
945 breakpoint at the current line, press "Pause Shift F8". | |
946 | |
947 The Pause key is Function key 21. If you don't have a working Pause key and | |
948 want to use F8 instead, use: > | |
949 | |
950 :map <F8> <F21> | |
951 | |
952 The External Editor module dynamically reads the NetBeans key bindings so vim | |
953 should always have the latest key bindings, even when NetBeans changes them. | |
954 | |
955 | |
956 10.3. Preparing NetBeans for Vim *netbeans-preparation* | |
957 | |
958 In order for NetBeans to work with vim, the NetBeans External Editor module | |
959 must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition | |
960 then this module should be loaded and enabled. If you have a NetBeans release | |
961 you may need to find another way of obtaining this open source module. | |
962 | |
963 You can check if you have this module by opening the Tools->Options dialog | |
964 and drilling down to the "Modules" list (IDE Configuration->System->Modules). | |
965 If your Modules list has an entry for "External Editor" you must make sure | |
966 it is enabled (the "Enabled" property should have the value "True"). If your | |
967 Modules list has no External Editor see the next section on |obtaining-exted|. | |
968 | |
969 | |
970 10.4. Obtaining the External Editor Module *obtaining-exted* | |
971 | |
972 There are 2 ways of obtaining the External Editor module. The easiest way | |
973 is to use the NetBeans Update Center to download and install the module. | |
974 Unfortunately, some versions do not have this module in their update | |
975 center. If you cannot download via the update center you will need to | |
976 download sources and build the module. I will try and get the module | |
977 available from the NetBeans Update Center so building will be unnecessary. | |
978 Also check http://externaleditor.netbeans.org for other availability options. | |
979 | |
980 To download the External Editor sources via CVS and build your own module, | |
981 see http://externaleditor.netbeans.org and http://www.netbeans.org. | |
982 Unfortunately, this is not a trivial procedure. | |
983 | |
984 | |
985 10.5. Setting up NetBeans to run with Vim *netbeans-setup* | |
986 | |
987 Assuming you have loaded and enabled the NetBeans External Editor module | |
988 as described in |netbeans-preparation| all you need to do is verify that | |
989 the gvim command line is properly configured for your environment. | |
990 | |
991 Open the Tools->Options dialog and open the Editing category. Select the | |
992 External Editor. The right hand pane should contain a Properties tab and | |
993 an Expert tab. In the Properties tab make sure the "Editor Type" is set | |
994 to "Vim". In the Expert tab make sure the "Vim Command" is correct. | |
995 | |
996 You should be careful if you change the "Vim Command". There are command | |
997 line options there which must be there for the connection to be properly | |
998 set up. You can change the command name but that's about it. If your gvim | |
999 can be found by your $PATH then the VIM Command can start with "gvim". If | |
1000 you don't want gvim searched from your $PATH then hard code in the full | |
1001 Unix path name. At this point you should get a gvim for any source file | |
1002 you open in NetBeans. | |
1003 | |
1004 If some files come up in gvim and others (with different file suffixes) come | |
1005 up in the default NetBeans editor you should verify the MIME type in the | |
1006 Expert tab MIME Type property. NetBeans is MIME oriented and the External | |
1007 Editor will only open MIME types specified in this property. | |
1008 | |
1009 | |
7 | 1010 vim:tw=78:ts=8:ft=help:norl: |