tags:

views:

84

answers:

1

As I am typing code, I would like to get the symbol before and after a specific character (e.g. '.' in C#) and pass that to my own program which would then in return give a list of possible completions.

For example if user is typing:

m_Filename.M

I would want to call out into my own DLL/EXE passing "m_Filename" and "M" and my program return a list such as

Match
Matches

And have that popup in a list in ViM for autocompletion suggestions.

Note that this is not asking how to write the DLL/EXE which provides the suggestions, just the functionality in ViM for autocomplete .

+4  A: 

In vim, see :help 'omnifunc' and :help complete-functions. You can write your own vim function to do completions, and that function can, in turn, invoke an external executable.

Laurence Gonsalves
Thanks, looks like what I was looking for.
esac