Loading ...
Sorry, an error occurred while loading the content.

Re: Intellisense for Vim Available (Beta)

Expand Messages
  • Bram Moolenaar
    [moved from the vim maillist to vim-dev] ... This sounds like a good idea. The patch also looks good. Did someone try it out? A couple remarks: - I don t
    Message 1 of 1 , Aug 28, 2003
    • 0 Attachment
      [moved from the vim maillist to vim-dev]

      Taro Muraoka wrote:

      > > porting it to other systems. Isn't there a similar method that would
      > > 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)
      > else
      > return "foo bar\<NL>Candidate\<NL>Your favorite"
      > endif
      > endfunction
      > set expandexpr=Completion
      >
      > This result three expand candidates "foo bar", "Candidate" and "Your
      > favorite".
      >
      > Additionally, if there is a "floating window" which show expand
      > candidates and other informations, vim could provide intellisence
      > framework for multiple platforms.

      This sounds like a good idea. The patch also looks good. Did someone
      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
      expansion.


      --
      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 ///
    Your message has been successfully submitted and would be delivered to recipients shortly.