comparison runtime/doc/usr_24.txt @ 819:23f82b5d2814 v7.0c10

updated for version 7.0c10
author vimboss
date Wed, 05 Apr 2006 20:41:53 +0000
parents 9f345c48220b
children 6675076019ae
comparison
equal deleted inserted replaced
818:1f929f3ca806 819:23f82b5d2814
1 *usr_24.txt* For Vim version 7.0c. Last change: 2005 Apr 01 1 *usr_24.txt* For Vim version 7.0c. Last change: 2006 Apr 02
2 2
3 VIM USER MANUAL - by Bram Moolenaar 3 VIM USER MANUAL - by Bram Moolenaar
4 4
5 Inserting quickly 5 Inserting quickly
6 6
230 the file is found in /usr/X11R6/ ~ 230 the file is found in /usr/X11R6/ ~
231 231
232 The results depend on what is found in your file system, of course. The 232 The results depend on what is found in your file system, of course. The
233 matches are sorted alphabetically. 233 matches are sorted alphabetically.
234 234
235
236 COMPLETING IN SOURCE CODE
237
238 Source code files are well structured. That makes it possible to do
239 completion in an intelligent way. In Vim this is called Omni completion. In
240 some other editors it's called intellisense, but that is a trademark.
241
242 The key to Omni completion is CTRL-X CTRL-O. Obviously the O stands for Omni
243 here, so that you can remember it easier. Let's use an example for editing C
244 source:
245
246 { ~
247 struct foo *p; ~
248 p-> ~
249
250 The cursor is after "p->". Now type CTRL-X CTRL-O. Vim will offer you a list
251 of alternatives, which are the items that "struct foo" contains. That is
252 quite different from using CTRL-P, which would complete any word, while only
253 members of "struct foo" are valid here.
254
255 For Omni completion to work you may need to do some setup. For C code you
256 need to create a tags file and set the 'tags' option. That is explained
257 |ft-c-omni|. For other filetypes you may need to do something similar, look
258 below |compl-omni-filetypes|. It only works for specific filetypes. Check
259 the value of the 'omnifunc' option to find out if it would work.
260
235 ============================================================================== 261 ==============================================================================
236 *24.4* Repeating an insert 262 *24.4* Repeating an insert
237 263
238 If you press CTRL-A, the editor inserts the text you typed the last time you 264 If you press CTRL-A, the editor inserts the text you typed the last time you
239 were in Insert mode. 265 were in Insert mode.