1*if_sniff.txt* For Vim version 7.3. Last change: 2005 Mar 29 2 3 4 VIM REFERENCE MANUAL 5 by Anton Leherbauer (toni@takefive.co.at) 6 7 8SNiFF+ and Vim *sniff* 9 101. Introduction |sniff-intro| 112. Commands |sniff-commands| 123. Compiling Vim with SNiFF+ interface |sniff-compiling| 13 14{Vi does not have any of these commands} *E275* *E274* *E276* *E278* *E279* 15 16The SNiFF+ interface only works, when Vim was compiled with the |+sniff| 17feature. 18 19============================================================================== 201. Introduction *sniff-intro* 21 22The following features for the use with SNiFF+ are available: 23 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 27 28How 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) 34 35Once a connection is established, SNiFF+ uses Vim for all requests to show or 36edit source code. On the other hand, you can send queries to SNiFF+ with the 37:sniff command. 38 39============================================================================== 402. Commands *sniff-commands* 41 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 47 48Most requests require a symbol (identifier) as parameter. If it is omitted, 49Vim will use the current word under the cursor. 50The available requests are listed below: 51 52request mapping description 53------------------------------------------------------------------------------- 54connect sc Establish connection with SNiFF+. 55 Make sure SNiFF+ is prepared for this in the 56 Preferences 57disconnect sq Disconnect from SNiFF+. You can reconnect any 58 time with :sniff connect (or 'sc') 59toggle st Toggle between implementation 60 and definition file 61find-symbol sf Load the symbol into a Symbol Browser 62browse-class sb Loads the class into a Class Browser 63superclass ss Edit superclass of symbol 64overridden so Edit overridden method of symbol 65retrieve-file srf Retrieve symbol in current file 66retrieve-project srp Retrieve symbol in current project 67retrieve-all-projects srP Retrieve symbol in all projects 68retrieve-next sR Retrieve symbol using current Retriever 69 settings 70goto-symbol sg Goto definition or implementation of symbol 71hierarchy sh Load symbol into the Hierarchy Browser 72restr-hier sH same as above but show only related classes 73xref-to sxt Start a refers-to query on symbol and 74 load the results into the Cross Referencer 75xref-by sxb Start a referred-by query on symbol 76xref-has sxh Start a refers-to components query on symbol 77xref-used-by sxu Start a referred-by as component query on 78 symbol 79show-docu sd Show documentation of symbol 80gen-docu sD Generate documentation of symbol 81 82The mappings are defined in a file 'sniff.vim', which is part of every SNiFF+ 83product ($SNIFF_DIR/config/sniff.vim). This file is sourced whenever Vim 84connects to SNiFF+. 85 86============================================================================== 873. Compiling Vim with SNiFF+ interface *sniff-compiling* 88 89To compile Vim with SNiFF+ support, you need two source files of the extra 90archive: if_sniff.c and if_sniff.h. 91On Unix: Edit the Makefile and uncomment the line "--enable-sniff". Or run 92configure manually with this argument. 93On NT: Specify SNIFF=yes with your make command. 94 95 vim:tw=78:ts=8:ft=help:norl: 96