summaryrefslogtreecommitdiff
path: root/runtime/doc/if_sniff.txt
blob: c8bf19936568f2cb63178bbd4d03b5fa0e8a8ee2 (plain)
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
*if_sniff.txt*	For Vim version 7.3g.  Last change: 2005 Mar 29


		  VIM REFERENCE MANUAL
		by Anton Leherbauer (toni@takefive.co.at)


SNiFF+ and Vim				    *sniff*

1. Introduction				    |sniff-intro|
2. Commands				    |sniff-commands|
3. Compiling Vim with SNiFF+ interface	    |sniff-compiling|

{Vi does not have any of these commands}  *E275* *E274* *E276* *E278* *E279*

The SNiFF+ interface only works, when Vim was compiled with the |+sniff|
feature.

==============================================================================
1. Introduction					*sniff-intro*

The following features for the use with SNiFF+ are available:

   * Vim can be used for all editing requests
   * SNiFF+ recognizes and updates all browsers when a file is saved in Vim
   * SNiFF+ commands can be issued directly from Vim

How to use Vim with SNiFF+
   1. Make sure SNiFF+ is running.
   2. In the Editor view of the Preferences dialog set the Field named
      'External Editor' to 'Emacs/Vim'.
   4. Start Vim
   5. Connect to SNiFF+ (:sniff connect)

Once a connection is established, SNiFF+ uses Vim for all requests to show or
edit source code.  On the other hand, you can send queries to SNiFF+ with the
:sniff command.

==============================================================================
2. Commands				    *sniff-commands*

			    *:sniff* *:sni*
:sni[ff] request [symbol]   Send request to sniff with optional symbol.
			    {not in Vi}
:sni[ff]		    Display all possible requests and the connection
			    status

Most requests require a symbol (identifier) as parameter.  If it is omitted,
Vim will use the current word under the cursor.
The available requests are listed below:

request		      mapping	description
-------------------------------------------------------------------------------
connect			sc	Establish connection with SNiFF+.
				Make sure SNiFF+ is prepared for this in the
				Preferences
disconnect		sq	Disconnect from SNiFF+.  You can reconnect any
				time with :sniff connect (or 'sc')
toggle			st	Toggle between implementation
				and definition file
find-symbol		sf	Load the symbol into a Symbol Browser
browse-class		sb	Loads the class into a Class Browser
superclass		ss	Edit superclass of symbol
overridden		so	Edit overridden method of symbol
retrieve-file		srf	Retrieve symbol in current file
retrieve-project	srp	Retrieve symbol in current project
retrieve-all-projects	srP	Retrieve symbol in all projects
retrieve-next		sR	Retrieve symbol using current Retriever
				settings
goto-symbol		sg	Goto definition or implementation of symbol
hierarchy		sh	Load symbol into the Hierarchy Browser
restr-hier		sH	same as above but show only related classes
xref-to			sxt	Start a refers-to query on symbol and
				load the results into the Cross Referencer
xref-by			sxb	Start a referred-by query on symbol
xref-has		sxh	Start a refers-to components query on symbol
xref-used-by		sxu	Start a referred-by as component query on
				symbol
show-docu		sd	Show documentation of symbol
gen-docu		sD	Generate documentation of symbol

The mappings are defined in a file 'sniff.vim', which is part of every SNiFF+
product ($SNIFF_DIR/config/sniff.vim).  This file is sourced whenever Vim
connects to SNiFF+.

==============================================================================
3. Compiling Vim with SNiFF+ interface		*sniff-compiling*

To compile Vim with SNiFF+ support, you need two source files of the extra
archive: if_sniff.c and if_sniff.h.
On Unix: Edit the Makefile and uncomment the line "--enable-sniff".  Or run
configure manually with this argument.
On NT: Specify SNIFF=yes with your make command.

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