D
Dominik Bathon
How does the keyword completion in vim work?
Check out :help completion:
Completion can be done for:
1. Whole lines |i_CTRL-X_CTRL-L|
2. keywords in the current file |i_CTRL-X_CTRL-N|
3. keywords in 'dictionary' |i_CTRL-X_CTRL-K|
4. keywords in 'thesaurus', thesaurus-style |i_CTRL-X_CTRL-T|
5. keywords in the current and included files |i_CTRL-X_CTRL-I|
6. tags |i_CTRL-X_CTRL-]|
7. file names |i_CTRL-X_CTRL-F|
8. definitions or macros |i_CTRL-X_CTRL-D|
9. Vim command-line |i_CTRL-X_CTRL-V|
10. keywords in 'complete' |i_CTRL-N|
But I don't like the CTRL-X_CTRL-* key combinations, so I use SuperTab:
http://www.vim.org/scripts/script.php?script_id=3D182
From this website:
description=09
Use your tab key to do all your completion in insert mode!
The script remembers the last completion type, and applies that.
Eg.: You want to enter /usr/local/lib/povray3/
You type (in insert mode):
/u<C-x><C-f>/l<Tab><Tab><Tab>/p<Tab>/i<Tab>
You can also manipulate the completion type used by changing g:complType =
=20
variable.
I mainly use it in mode 2. It works great for ruby.
Dominik