blob: 5007122d051cbd64beaeb179cba3a1f88e3ae948 [file] [log] [blame]
Bram Moolenaar65c1b012005-01-31 19:02:28 +00001*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Jan 31
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Gordon Prieur
5
6
7NetBeans ExternalEditor Integration Features *netbeans*
8 *netbeans-support*
91. Introduction |netbeans-intro|
102. NetBeans Key Bindings |netbeans-keybindings|
113. Configuring Vim for NetBeans |netbeans-configure|
124. Downloading NetBeans |netbeans-download|
135. Preparing NetBeans for Vim |netbeans-preparation|
146. Obtaining the External Editor Module |obtaining-exted|
157. Setting up NetBeans to run with Vim |netbeans-setup|
168. Messages |netbeans-messages|
179. Running Vim from NetBeans |netbeans-run|
1810. NetBeans protocol |netbeans-protocol|
Bram Moolenaar65c1b012005-01-31 19:02:28 +00001911. NetBeans commands |netbeans-commands|
2012. Known problems |netbeans-problems|
Bram Moolenaar071d4272004-06-13 20:20:40 +000021
22{Vi does not have any of these features}
23{only available when compiled with the |+netbeans_intg| feature}
24
25==============================================================================
261. Introduction *netbeans-intro*
27
28NetBeans is an open source Integrated Development Environment developed
29jointly by Sun Microsystems, Inc. and the netbeans.org developer community.
30Initially just a Java IDE, NetBeans has had C, C++, and Fortran support added
31in recent releases.
32
33For more information visit the main NetBeans web site http://www.netbeans.org
34or the NetBeans External Editor site at http://externaleditor.netbeans.org.
35
36Sun Microsystems, Inc. also ships NetBeans under the name Sun ONE Studio.
37Visit http://www.sun.com for more information regarding the Sun ONE Studio
38product line.
39
40Current releases of NetBeans provide full support for Java and limited support
41for C, C++, and Fortran. Current releases of Sun ONE Studio provide full
42support for Java, C, C++, and Fortran.
43
44The interface to NetBeans is also supported by Agide, the A-A-P GUI IDE.
45Agide is very different from NetBeans:
46- Based on Python instead of Java, much smaller footprint and fast startup.
47- Agide is a framework in which many different tools can work together.
48See the A-A-P website for information: http://www.A-A-P.org.
49
50==============================================================================
512. NetBeans Key Bindings *netbeans-keybindings*
52
53Vim understands a number of key bindings that execute NetBeans commands. These
54are typically all the Function key combinations. To execute a NetBeans command,
55the user must press the Pause key followed by a NetBeans key binding. For
56example, in order to compile a Java file, the NetBeans key binding is "F9". So,
57while in vim, press "Pause F9" to compile a java file. To toggle a breakpoint
58at the current line, press "Pause Shift F8".
59
60The Pause key is Function key 21. If you don't have a working Pause key and
61want to use F8 instead, use: >
62
63 :map <F8> <F21>
64
65The External Editor module dynamically reads the NetBeans key bindings so vim
66should always have the latest key bindings, even when NetBeans changes them.
67
68==============================================================================
693. Configuring Vim for NetBeans *netbeans-configure*
70
71For more help installing vim, please read |usr_90.txt| in the Vim User Manual.
72
73
74On Unix
75
76When running configure without arguments the NetBeans interface should be
77included. That is, if the configure check to find out if your system supports
78the required features succeeds.
79
80In case you do not want the NetBeans interface you can disable it by
81uncommenting a line with "--disable-netbeans" in the Makefile.
82
83Currently, only gvim is supported in this integration as NetBeans does not
84have means to supply a terminal emulator for the vim command. Furthermore,
85there is only GUI support for GTK, GNOME, and Motif.
86
87If Motif support is required the user must supply XPM libraries. See
88|workshop-xpm| for details on obtaining the latest version of XPM.
89
90
91On MS-Windows
92
93The Win32 support is now in beta stage.
94
95To use XPM signs on Win32 (e.g. when using with NetBeans) you can compile
96XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/misc/
97(for MS Visual C++) or http://gnuwin32.sourceforge.net (for MinGW).
98
99==============================================================================
1004. Downloading NetBeans *netbeans-download*
101
102The NetBeans IDE is available for download from netbeans.org. You can download
103a released version, download sources, or use CVS to download the current
104source tree. If you choose to download sources, follow directions from
105netbeans.org on building NetBeans.
106
107Depending on the version of NetBeans you download, you may need to do further
108work to get the required External Editor module. This is the module which lets
109NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org
110for details on downloading this module if your NetBeans release does not have
111it.
112
113For C, C++, and Fortran support you will also need the cpp module. See
114http://cpp.netbeans.org for information regarding this module.
115
116You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day
117free trial. See http://www.sun.com for further details.
118
119==============================================================================
1205. Preparing NetBeans for Vim *netbeans-preparation*
121
122In order for NetBeans to work with vim, the NetBeans External Editor module
123must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition
124then this module should be loaded and enabled. If you have a NetBeans release
125you may need to find another way of obtaining this open source module.
126
127You can check if you have this module by opening the Tools->Options dialog
128and drilling down to the "Modules" list (IDE Configuration->System->Modules).
129If your Modules list has an entry for "External Editor" you must make sure
130it is enabled (the "Enabled" property should have the value "True"). If your
131Modules list has no External Editor see the next section on |obtaining-exted|.
132
133==============================================================================
1346. Obtaining the External Editor Module *obtaining-exted*
135
136There are 2 ways of obtaining the External Editor module. The easiest way
137is to use the NetBeans Update Center to download and install the module.
138Unfortunately, some versions do not have this module in their update
139center. If you cannot download via the update center you will need to
140download sources and build the module. I will try and get the module
141available from the NetBeans Update Center so building will be unnecessary.
142Also check http://externaleditor.netbeans.org for other availability options.
143
144To download the External Editor sources via CVS and build your own module,
145see http://externaleditor.netbeans.org and http://www.netbeans.org.
146Unfortunately, this is not a trivial procedure.
147
148==============================================================================
1497. Setting up NetBeans to run with Vim *netbeans-setup*
150
151Assuming you have loaded and enabled the NetBeans External Editor module
152as described in |netbeans-preparation| all you need to do is verify that
153the gvim command line is properly configured for your environment.
154
155Open the Tools->Options dialog and open the Editing category. Select the
156External Editor. The right hand pane should contain a Properties tab and
157an Expert tab. In the Properties tab make sure the "Editor Type" is set
158to "Vim". In the Expert tab make sure the "Vim Command" is correct.
159
160You should be careful if you change the "Vim Command". There are command
161line options there which must be there for the connection to be properly
162set up. You can change the command name but thats about it. If your gvim
163can be found by your $PATH then the VIM Command can start with "gvim". If
164you don't want gvim searched from your $PATH then hard code in the full
165Unix path name. At this point you should get a gvim for any source file
166you open in NetBeans.
167
168If some files come up in gvim and others (with different file suffixes) come
169up in the default NetBeans editor you should verify the MIME type in the
170Expert tab MIME Type property. NetBeans is MIME oriented and the External
171Editor will only open MIME types specified in this property.
172
173==============================================================================
1748. Messages *netbeans-messages*
175
176These messages are specific for NetBeans:
177
178 *E463*
179Region is guarded, cannot modify
180 NetBeans defines guarded areas in the text, which you cannot
181 change.
182
183 *E656*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000184NetBeans disallows writes of unmodified buffers
Bram Moolenaar071d4272004-06-13 20:20:40 +0000185 NetBeans does not support writes of unmodified buffers that
186 were opened from NetBeans.
187
188 *E657*
189Partial writes disallowed for NetBeans buffers
190 NetBeans does not support partial writes for buffers that were
191 opened from NetBeans.
192
193 *E658*
194NetBeans connection lost for this buffer
195 NetBeans has become confused about the state of this file.
196 Rather than risc data corruption, NetBeans has severed the
197 connection for this file. Vim will take over responsibility
198 for saving changes to this file and NetBeans will no longer
199 know of these changes.
200
Bram Moolenaar65c1b012005-01-31 19:02:28 +0000201 *E744*
202NetBeans does not allow changes in read-only files
203 Vim normally allows changes to a read-only file and only
204 enforces the read-only rule if you try to write the file.
205 However, NetBeans does not let you make changes to a file
206 which is read-only and becomes confused if vim does this.
207 So vim does not allow modifications to files when run with
208 NetBeans.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000209==============================================================================
2109. Running Vim from NetBeans *netbeans-run*
211
212NetBeans starts Vim with the |-nb| argument. Three forms can be used, that
213differ in the way the information for the connection is specified:
214
215 -nb={fname} from a file
216 -nb:{hostname}:{addr}:{password} directly
217 -nb from a file or environment
218
219 *E660* *E668*
220For security reasons, the best method is to write the information in a file
221readable only by the user. The name of the file can be passed with the
222"-nb={fname}" argument or, when "-nb" is used without a parameter, the
223environment variable "__NETBEANS_CONINFO". The file must contain these three
224lines, in any order:
225
226 host={hostname}
227 port={addr}
228 auth={password}
229
230Other lines are ignored. The caller of Vim is responsible for deleting the
231file afterwards.
232
233{hostname} is the name of the machine where NetBeans is running. When omitted
234the environment variable "__NETBEANS_HOST" is used or the default "localhost".
235
236{addr} is the port number for NetBeans. When omitted the environment variable
237"__NETBEANS_SOCKET" is used or the default 3219.
238
239{password} is the password for connecting to NetBeans. When omitted the
240environment variable "__NETBEANS_VIM_PASSWORD" is used or "changeme".
241
242==============================================================================
24310. NetBeans protocol *netbeans-protocol*
244
245The communication between NetBeans and Vim uses plain text messages. This
246protocol was first designed to work with the external editor module of
247NetBeans (see http://externaleditor.netbeans.org). Later it was extended to
248work with Agide (A-A-P GUI IDE, see http://www.a-a-p.org). The extensions are
249marked with "version 2.1".
250
251Version 2.2 of the protocol has several minor changes which should only
252affect NetBeans users (ie, not Agide users). However, a bug was fixed which
253could cause confusion. The netbeans_saved() function sent a "save" protocol
254command. In protocol version 2.1 and earlier this was incorrectly interpreted
255as a notification that a write had taken place. In reality, it told NetBeans
256to save the file so multiple writes were being done. This caused various
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000257problems and has been fixed in 2.2. To decrease the likelihood of this
Bram Moolenaar071d4272004-06-13 20:20:40 +0000258confusion happening again, netbeans_saved() has been renamed to
259netbeans_save_buffer().
260
261The messages are currently sent over a socket. Since the messages are in
262plain UTF-8 text this protocol could also be used with any other communication
263mechanism.
264
26510.1 Kinds of messages |nb-messages|
26610.2 Terms |nb-terms|
26710.3 Commands |nb-commands|
26810.4 Functions and Replies |nb-functions|
26910.5 Events |nb-events|
27010.6 Special messages |nb-special|
271
272*E627* *E628* *E629* *E630* *E631* *E632* *E633* *E634* *E635* *E636*
273*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
274*E647* *E648* *E649* *E650* *E651* *E652* *E653* *E654*
275These errors occur when a message violates the protocol.
276
277
27810.1 Kinds of messages *nb-messages*
279
280There are four kinds of messages:
281
282kind direction comment ~
283Command IDE -> editor no reply necessary
284Function IDE -> editor editor must send back a reply
285Reply editor -> IDE only in response to a Function
286Event editor -> IDE no reply necessary
287
288The messages are sent as a single line with a terminating newline character.
289Arguments are separated by a single space. The first item of the message
290depends on the kind of message:
291
292kind first item example ~
293Command bufID:name!seqno 11:showBalloon!123 "text"
294Function bufID:name/seqno 11:getLength/123
295Reply seqno 123 5000
296Event bufID:name=123 11:keyCommand=123 "S-F2"
297
298
29910.2 Terms *nb-terms*
300
301bufID Buffer number. A message may be either for a specific buffer
302 or generic. Generic messages use a bufID of zero. NOTE: this
303 buffer ID is assigned by the IDE, it is not Vim's buffer
304 number. The bufID must be a sequentially rising number,
305 starting at one.
306
307seqno The IDE uses a sequence number for Commands and Functions. A
308 Reply must use the sequence number of the Function that it is
309 associated with. A zero sequence number can be used for
310 Events (the seqno of the last received Command or Function can
311 also be used).
312
313string Argument in double quotes. Text is in UTF-8 encoding. This
314 means ASCII is passed as-is. Special characters are
315 represented with a backslash:
316 \" double quote
317 \n newline
318 \r carriage-return
319 \t tab (optional, also works literally)
320 \\ backslash
321 NUL bytes are not allowed!
322
323boolean Argument with two possible values:
324 T true
325 F false
326
327number Argument with a decimal number.
328
329optnum Argument with either a decimal number or "none" (without the
330 quotes).
331
332offset A number argument that indicates a byte position in a buffer.
333 The first byte has offset zero. Line breaks are counted for
334 how they appear in the file (CR/LF counts for two bytes).
335 Note that a multi-byte character is counted for the number of
336 bytes it takes.
337
338lnum/col Argument with a line number and column number position. The
339 line number starts with one, the column is the byte position,
340 starting with zero. Note that a multi-byte character counts
341 for several columns.
342
343pathname String argument: file name with full path.
344
345
34610.3 Commands *nb-commands*
347
348actionMenuItem Not implemented.
349
350actionSensitivity
351 Not implemented.
352
353addAnno serNum typeNum off len
354 Place an annotation in this buffer.
355 Arguments:
356 serNum number serial number of this placed
357 annotation, used to be able to remove
358 it
359 typeNum number sequence number of the annotation
360 defined with defineAnnoType for this
361 buffer
362 off number offset where annotation is to be placed
363 len number not used
364 In version 2.1 "lnum/col" can be used instead of "off".
365
366balloonResult text
367 Not implemented.
368
369close Close the buffer. This leaves us without current buffer, very
370 dangerous to use!
371
372create Creates a buffer without a name. Replaces the current buffer
373 (it's hidden when it was changed).
374 NetBeans uses this as the first command for a file that is
375 being opened. The sequence of commands could be:
376 create
377 setCaretListener (ignored)
378 setModified (no effect)
379 setContentType (ignored)
380 startDocumentListen
381 setTitle
382 setFullName
383
384defineAnnoType typeNum typeName tooltip glyphFile fg bg
385 Define a type of annotation for this buffer.
386 Arguments:
387 typeNum number sequence number (not really used)
388 typeName string name that identifies this annotation
389 tooltip string not used
390 glyphFile string name of icon file
391 fg optnum foreground color for line highlighting
392 bg optnum background color for line highlighting
393 Vim will define a sign for the annotation.
394 When both "fg" and "bg" are "none" no line highlighting is
395 used (new in version 2.1).
396 When "glyphFile" is empty, no text sign is used (new in
397 version 2.1).
398 When "glyphFile" is one or two characters long, a text sign is
399 defined (new in version 2.1).
400 Note: the annotations will be defined in sequence, and the
401 sequence number is later used with addAnno.
402
403editFile pathname
404 Set the name for the buffer and edit the file "pathname", a
405 string argument.
406 Normal way for the IDE to tell the editor to edit a file. If
407 the IDE is going to pass the file text to the editor use these
408 commands instead:
409 setFullName
410 insert
411 initDone
412 New in version 2.1.
413
414enableBalloonEval
415 Not implemented.
416
417endAtomic End an atomic operation. The changes between "startAtomic"
418 and "endAtomic" can be undone as one operation. But it's not
419 implemented yet. Redraw when necessary.
420
421guard off len
422 Mark an area in the buffer as guarded. This means it cannot
423 be edited. "off" and "len" are numbers and specify the text
424 to be guarded.
425
426initDone Mark the buffer as ready for use. Implicitly makes the buffer
427 the current buffer. Fires the BufReadPost autocommand event.
428
Bram Moolenaar009b2592004-10-24 19:18:58 +0000429insertDone
430 Sent by NetBeans to tell vim an initial file insert is done.
431 This triggers a read message being printed. Prior to version
432 2.3, no read messages were displayed after opening a file.
433 New in version 2.3.
434
Bram Moolenaar071d4272004-06-13 20:20:40 +0000435moveAnnoToFront serNum
436 Not implemented.
437
438netbeansBuffer isNetbeansBuffer
439 If "isNetbeansBuffer" is "T" then this buffer is ``owned'' by
440 NetBeans.
441 New in version 2.2.
442
443putBufferNumber pathname
444 Associate a buffer number with the Vim buffer by the name
445 "pathname", a string argument. To be used when the editor
446 reported editing another file to the IDE and the IDE needs to
447 tell the editor what buffer number it will use for this file.
448 Also marks the buffer as initialized.
449 New in version 2.1.
450
451raise Bring the editor to the foreground.
452 New in version 2.1.
453
454removeAnno serNum
455 Remove a previously place annotation for this buffer.
456 "serNum" is the same number used in addAnno.
457
458save Save the buffer when it was modified. The other side of the
459 interface is expected to write the buffer and invoke
460 "setModified" to reset the "changed" flag of the buffer.
461 The writing is skipped when one of these conditions is true:
462 - 'write' is not set
463 - the buffer is read-only
464 - the buffer does not have a file name
465 - 'buftype' disallows writing
466 New in version 2.2.
467
Bram Moolenaar009b2592004-10-24 19:18:58 +0000468saveDone
469 Sent by NetBeans to tell vim a save is done. This triggers
470 a save message being printed. Prior to version 2.3, no save
471 messages were displayed after a save.
472 New in version 2.3.
473
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474setAsUser Not implemented.
475
476setBufferNumber pathname
477 Associate a buffer number with Vim buffer by the name
478 "pathname". To be used when the editor reported editing
479 another file to the IDE and the IDE needs to tell the editor
480 what buffer number it will use for this file.
481 Has the side effect of making the buffer the current buffer.
482 See "putBufferNumber" for a more useful command.
483
484setContentType
485 Not implemented.
486
487setDot off Make the buffer the current buffer and set the cursor at the
488 specified position. If there are folds they are opened to
489 make the cursor line visible.
490 In version 2.1 "lnum/col" can be used instead of "off".
491
492setExitDelay seconds
493 Set the delay for exiting to "seconds", a number.
494 This delay is used to give the IDE a chance to handle things
495 before really exiting. The default delay is two seconds.
496 New in version 2.1.
Bram Moolenaar009b2592004-10-24 19:18:58 +0000497 Obsolete in version 2.3.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000498
499setFullName pathname
500 Set the file name to be used for a buffer to "pathname", a
501 string argument.
502 Used when the IDE wants to edit a file under control of the
503 IDE. This makes the buffer the current buffer, but does not
504 read the file. "insert" commands will be used next to set the
505 contents.
506
507setLocAndSize Not implemented.
508
509setMark Not implemented.
510
511setModified modified
512 When the boolean argument "modified" is "T" mark the buffer as
513 modified, when it is "F" mark it as unmodified.
514
Bram Moolenaar009b2592004-10-24 19:18:58 +0000515setModtime time
516 Update a buffers modification time after NetBeans saves the
517 file.
518 New in version 2.3.
519
520setReadOnly
521 Passed by NetBeans to tell vim a file is readonly.
522 Implemented in verion 2.3.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523
524setStyle Not implemented.
525
526setTitle name
527 Set the title for the buffer to "name", a string argument.
528 The title is only used for NetBeans functions, not by Vim.
529
530setVisible visible
531 When the boolean argument "visible" is "T", goto the buffer.
532 The "F" argument does nothing.
533
534showBalloon text
535 Show a balloon (popup window) at the mouse pointer position,
536 containing "text", a string argument. The balloon should
537 disappear when the mouse is moved more than a few pixels.
538 New in version 2.1.
539
Bram Moolenaar009b2592004-10-24 19:18:58 +0000540specialKeys
541 Map a set of keys (mostly function keys) to be passed back
542 to NetBeans for processing. This lets NetBeans hotkeys be
543 used from vim.
544 Implemented in version 2.3.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000545
546startAtomic Begin an atomic operation. The screen will not be updated
547 until "endAtomic" is given.
548
549startCaretListen
550 Not implemented.
551
552startDocumentListen
553 Mark the buffer to report changes to the IDE with the
554 "insert" and "remove" events. The default is to report
555 changes.
556
557stopCaretListen
558 Not implemented.
559
560stopDocumentListen
561 Mark the buffer to stop reporting changes to the IDE.
562 Opposite of startDocumentListen.
Bram Moolenaar748bf032005-02-02 23:04:36 +0000563 NOTE: if "netbeansBuffer" was used to mark this buffer as a
564 NetBeans buffer, then the buffer is deleted in Vim. This is
565 for compatibility with Sun Studio 10.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566
567unguard off len
568 Opposite of "guard", remove guarding for a text area.
569
570version Not implemented.
571
572
57310.4 Functions and Replies *nb-functions*
574
575getDot Not implemented.
576
577getCursor Return the current buffer and cursor position.
578 The reply is:
579 seqno bufID lnum col off
580 seqno = sequence number of the function
581 bufID = buffer ID of the current buffer (if this is unknown -1
582 is used)
583 lnum = line number of the cursor (first line is one)
584 col = column number of the cursor (in bytes, zero based)
585 off = offset of the cursor in the buffer (in bytes)
586 New in version 2.1.
587
588getLength Return the length of the buffer in bytes.
589 Reply example for a buffer with 5000 bytes:
590 123 5000
591 TODO: explain use of partial line.
592
593getMark Not implemented.
594
595getModified When a buffer is specified: Return zero if the buffer does not
596 have changes, one if it does have changes.
597 When no buffer is specified (buffer number zero): Return the
598 number of buffers with changes. When the result is zero it's
599 safe to tell Vim to exit.
600 New in version 2.1.
601
602getText Return the contents of the buffer as a string.
603 Reply example for a buffer with two lines
604 123 "first line\nsecond line\n"
605 NOTE: docs indicate an offset and length argument, but this is
606 not implemented.
607
608insert off text
609 Insert "text" before position "off". "text" is a string
610 argument, "off" a number.
611 Possible replies:
612 123 no problem
613 123 !message failed
614 Note that the message in the reply is not quoted.
615
616remove off length
617 Delete "length" bytes of text at position "off". Both
618 arguments are numbers.
619 Possible replies:
620 123 no problem
621 123 !message failed
622 Note that the message in the reply is not quoted.
623
624saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
625 If there are no changed files or the user does not cancel the
626 operation Vim exits and no result is sent back. The IDE can
627 consider closing the connection as a successful result.
628 If the user cancels the operation the number of modified
629 buffers that remains is returned and Vim does not exit.
630 New in version 2.1.
631
632
63310.5 Events *nb-events*
634
635balloonEval off len type
636 The mouse pointer rests on text for a short while. When "len"
637 is zero, there is no selection and the pointer is at position
638 "off". When "len" is non-zero the text from position "off" to
639 "off" + "len" is selected.
640 Only sent after "enableBalloonEval" was used for this buffer.
641 "type" is not yet defined.
642 Not implemented yet.
643
644balloonText text
645 Used when 'ballooneval' is set and the mouse pointer rests on
646 some text for a moment. "text" is a string, the text under
647 the mouse pointer.
648 New in version 2.1.
649
650buttonRelease button lnum col
651 Report which button was pressed and the location of the cursor
652 at the time of the release. Only for buffers that are owned
653 by NetBeans. This event is not sent if the button was
654 released while the mouse was in the status line or in a
655 separator line. If col is less than 1 the button release was
656 in the sign area.
657 New in version 2.2.
658
Bram Moolenaar009b2592004-10-24 19:18:58 +0000659disconnect
660 Tell NetBeans that vim is exiting and not to try and read or
661 write more commands.
662 New in version 2.3.
663
Bram Moolenaar071d4272004-06-13 20:20:40 +0000664fileClosed Not implemented.
665
666fileModified Not implemented.
667
668fileOpened pathname open modified
669 A file was opened by the user.
670 Arguments:
671 pathname string name of the file
672 open boolean always "T"
673 modified boolean always "F"
674
675geometry cols rows x y
676 Report the size and position of the editor window.
677 Arguments:
678 cols number number of text columns
679 rows number number of text rows
680 x number pixel position on screen
681 y number pixel position on screen
682 Only works for Motif.
683
684insert off text
685 Text "text" has been inserted in Vim at position "off".
686 Only fired when enabled, see "startDocumentListen".
687
688invokeAction Not implemented.
689
690keyCommand keyName
691 Reports a special key being pressed with name "keyName", which
692 is a string.
693 Supported key names:
694 F1 function key 1
695 F2 function key 2
696 ...
697 F12 function key 12
698
699 ' ' space (without the quotes)
700 ! exclamation mark
701 ... any other ASCII printable character
702 ~ tilde
703
704 X any unrecognized key
705
706 The key may be prepended by "C", "S" and/or "M" for Control,
707 Shift and Meta (Alt) modifiers. If there is a modifier a dash
708 is used to separate it from the key name. For example:
709 "C-F2".
710 ASCII characters are new in version 2.1.
711
712keyAtPos keyName lnum/col
713 Like "keyCommand" and also report the line number and column
714 of the cursor.
715 New in version 2.1.
716
717killed A file was closed by the user. Only for files that have been
718 assigned a number by the IDE.
719
720newDotAndMark off off
721 Reports the position of the cursor being at "off" bytes into
722 the buffer. Only sent just before a "keyCommand" event.
723
724quit Not implemented.
725
726remove off len
727 Text was deleted in Vim at position "off" with byte length
728 "len".
729 Only fired when enabled, see "startDocumentListen".
730
731revert Not implemented.
732
733save The buffer has been saved and is now unmodified.
734 Only fired when enabled, see "startDocumentListen".
735
736startupDone The editor has finished its startup work and is ready for
737 editing files.
738 New in version 2.1.
739
740unmodified The buffer is now unmodified.
741 Only fired when enabled, see "startDocumentListen".
742
743version vers Report the version of the interface implementation. Vim
744 reports "2.2" (including the quotes).
745
746
74710.6 Special messages *nb-special*
748
749These messages do not follow the style of the messages above. They are
750terminated by a newline character.
751
752ACCEPT Not used.
753
754AUTH password editor -> IDE: First message that the editor sends to the IDE.
755 Must contain the password for the socket server, as specified
756 with the |-nb| argument. No quotes are used!
757
758DISCONNECT IDE -> editor: break the connection. The editor will exit.
759 The IDE must only send this message when there are no unsaved
760 changes!
761
762DETACH IDE -> editor: break the connection without exiting the
763 editor. Used when the IDE exits without bringing down the
764 editor as well.
765 New in version 2.1.
766
767REJECT Not used.
768
769==============================================================================
Bram Moolenaar65c1b012005-01-31 19:02:28 +000077011. NetBeans Commands *netbeans-commands*
771
772 *:nbkey*
773:nbkey key Pass the key to NetBeans for processing
774
775Pass the key to NetBeans for hot-key processing. You should not need to use
776this command directly. However, NetBeans passes a list of hot-keys to Vim at
777startup and when one of these keys is pressed, this command is generated to
778send the key press back to NetBeans.
779
780==============================================================================
78112. Known problems *netbeans-problems*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782
783NUL bytes are not possible. For editor -> IDE they will appear as NL
784characters. For IDE -> editor they cannot be inserted.
785
786
787 vim:tw=78:ts=8:ft=help:norl: