Re: Intellisense for Vim Available (Beta)
- [moved from the vim maillist to vim-dev]
Taro Muraoka wrote:
> > porting it to other systems. Isn't there a similar method that wouldThis sounds like a good idea. The patch also looks good. Did someone
> > work on multiple platforms?
> I suggest to make vim to provide UI. Vim has insert_expand mechanism.
> Currently it expand words from files which vim can access. If there is
> a method to generate expand words by vim script, we could implement
> Intellisense for various languages on this framework.
> Attached experimental patch implement this idea: user defined
> completion. When type <C-X><C-N> in insert mode, a callback function
> which specified by 'expandexpr' option is called twice. Callback
> function must return a string, which concatenate all expand word
> candidates by "\<NL>". Example:
> function! Completion(line, pat, curpos, preproc)
> if a:preproc
> let str = strpart(a:line, 0, a:curpos)
> let str = matchstr(str, '\w\+$')
> return a:curpos - strlen(str)
> return "foo bar\<NL>Candidate\<NL>Your favorite"
> set expandexpr=Completion
> This result three expand candidates "foo bar", "Candidate" and "Your
> Additionally, if there is a "floating window" which show expand
> candidates and other informations, vim could provide intellisence
> framework for multiple platforms.
try it out?
A couple remarks:
- I don't think we need another feature for this. FEAT_INS_EXPAND plus
FEAT_EVAL should be enough.
- CTRL-X CTRL-N already has a meaning after typing CTRL-N: complete the
next word. I think we need another key combination for the expression
hundred-and-one symptoms of being an internet addict:
251. You've never seen your closest friends who usually live WAY too far away.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///