2009年11月14日 星期六

perl-completion



http://github.com/c9s/perl-completion.vim

which is defined with omni-completion. when filetype is perl , the completion function will be binded. this plugin completes function names for you and also base class function names.

you need to install VIM::Packager first, it solve dependencies for you. the depended scripts will be retrived from an url , which is on github.com.

remember to add path ~/.vim/bin to your $PATH env variable to make sure vimscript can find the scripts. the parsing utils will be installed in ~/.vim/bin/.

$ sudo cpan VIM::Packager

# run vim-packager to convert VIM meta file (VIMMETA)
$ vim-packager build
$ make install

just press C-x C-o after a $self-> or Package::Something-> to pop the completion menu up when you are in perl files.
and you can also integrate this to your autocomplpop plugin.

will support Moose TypeConstrant , Accessor completetion in future.

4 則留言:

  1. There is Devel::IntelliPerl which I wrote some month ago. It would be great to join forces on that topic.

    Moose constraints and even MooseX::Declare magic is introspected. Things like chaining work. Just have a look at the tests.

    回覆刪除
  2. I tried my own completion using ctags so yours seems to be more smart. Mo proposed to join your efforts and i would like to be in.

    Regards

    回覆刪除
  3. @Mo,

    Devel::IntelliPerl seems cool, is it evaling perl code to get completions ? well if it's using Moose, then we will need to cache those completions. and is it slow ?

    I will look into MooseX::Declare tests ;-)

    @Marc,

    thank you ! welcome !

    回覆刪除
  4. @Mo,

    i tried to use Devel::IntelliPerl by pasting the synopsis code. but the @methods is empty. it's version 0.02 with perl5.10.1 .

    回覆刪除