Partially synced with the branch.
[MacVim.git] / runtime / doc / if_sniff.txt
blobc5e299685614cdc91dd3212e3fdf1a6cd9cabf03
1 *if_sniff.txt*  For Vim version 7.2c.  Last change: 2005 Mar 29
4                   VIM REFERENCE MANUAL
5                 by Anton Leherbauer (toni@takefive.co.at)
8 SNiFF+ and Vim                              *sniff*
10 1. Introduction                             |sniff-intro|
11 2. Commands                                 |sniff-commands|
12 3. Compiling Vim with SNiFF+ interface      |sniff-compiling|
14 {Vi does not have any of these commands}  *E275* *E274* *E276* *E278* *E279*
16 The SNiFF+ interface only works, when Vim was compiled with the |+sniff|
17 feature.
19 ==============================================================================
20 1. Introduction                                 *sniff-intro*
22 The following features for the use with SNiFF+ are available:
24    * Vim can be used for all editing requests
25    * SNiFF+ recognizes and updates all browsers when a file is saved in Vim
26    * SNiFF+ commands can be issued directly from Vim
28 How to use Vim with SNiFF+
29    1. Make sure SNiFF+ is running.
30    2. In the Editor view of the Preferences dialog set the Field named
31       'External Editor' to 'Emacs/Vim'.
32    4. Start Vim
33    5. Connect to SNiFF+ (:sniff connect)
35 Once a connection is established, SNiFF+ uses Vim for all requests to show or
36 edit source code.  On the other hand, you can send queries to SNiFF+ with the
37 :sniff command.
39 ==============================================================================
40 2. Commands                                 *sniff-commands*
42                             *:sniff* *:sni*
43 :sni[ff] request [symbol]   Send request to sniff with optional symbol.
44                             {not in Vi}
45 :sni[ff]                    Display all possible requests and the connection
46                             status
48 Most requests require a symbol (identifier) as parameter.  If it is omitted,
49 Vim will use the current word under the cursor.
50 The available requests are listed below:
52 request               mapping   description
53 -------------------------------------------------------------------------------
54 connect                 sc      Establish connection with SNiFF+.
55                                 Make sure SNiFF+ is prepared for this in the
56                                 Preferences
57 disconnect              sq      Disconnect from SNiFF+.  You can reconnect any
58                                 time with :sniff connect (or 'sc')
59 toggle                  st      Toggle between implementation
60                                 and definition file
61 find-symbol             sf      Load the symbol into a Symbol Browser
62 browse-class            sb      Loads the class into a Class Browser
63 superclass              ss      Edit superclass of symbol
64 overridden              so      Edit overridden method of symbol
65 retrieve-file           srf     Retrieve symbol in current file
66 retrieve-project        srp     Retrieve symbol in current project
67 retrieve-all-projects   srP     Retrieve symbol in all projects
68 retrieve-next           sR      Retrieve symbol using current Retriever
69                                 settings
70 goto-symbol             sg      Goto definition or implementation of symbol
71 hierarchy               sh      Load symbol into the Hierarchy Browser
72 restr-hier              sH      same as above but show only related classes
73 xref-to                 sxt     Start a refers-to query on symbol and
74                                 load the results into the Cross Referencer
75 xref-by                 sxb     Start a referred-by query on symbol
76 xref-has                sxh     Start a refers-to components query on symbol
77 xref-used-by            sxu     Start a referred-by as component query on
78                                 symbol
79 show-docu               sd      Show documentation of symbol
80 gen-docu                sD      Generate documentation of symbol
82 The mappings are defined in a file 'sniff.vim', which is part of every SNiFF+
83 product ($SNIFF_DIR/config/sniff.vim).  This file is sourced whenever Vim
84 connects to SNiFF+.
86 ==============================================================================
87 3. Compiling Vim with SNiFF+ interface          *sniff-compiling*
89 To compile Vim with SNiFF+ support, you need two source files of the extra
90 archive: if_sniff.c and if_sniff.h.
91 On Unix: Edit the Makefile and uncomment the line "--enable-sniff".  Or run
92 configure manually with this argument.
93 On NT: Specify SNIFF=yes with your make command.
95  vim:tw=78:ts=8:ft=help:norl: