preliminary rubycomplete documentation for review
Mark Guzman
segfault at hasno.info
Thu Apr 20 02:49:09 EDT 2006
Gavin Sinclair wrote:
>
>
> My suggested replacement for the relevant section is below. I aimed
> for a style that's consistent with the rest of the Vim online help.
>
> It should be viewed in Vim with ':set filetype=help' to see the highlighting.
>
> BTW Mark, your prelim documentation mentioned that object specific
> completion would be done after any of {. : ::}. What is ":" supposed
> to do?
>
> Cheers,
> Gavin
>
> P.S. Please only send the relevant text in future. The attachment
> before was so large that Mailman asked me to approve it before it
> could be posted to the list!
>
Gavin,
: will complete symbols. If done with no preceding text it will provide
a list of global symbols.
Sorry about the file-size, I'll snip the segment next time.
Here's a slightly updated version of the doc:
== begin
RUBY *ft-ruby-omni*
Completion of Ruby code requires that vim be built with |+ruby|.
Ruby completion will parse your buffer on demand in order to provide a list of
completions. These completions will be drawn from modules loaded by 'require'
and modules defined in the current buffer.
The completions provided by CTRL-X CTRL-O are sensitive to the context:
CONTEXT COMPLETIONS PROVIDED ~
1. Not inside a class definition Classes, constants and globals
2. Inside a class definition Methods or constants defined in the class
3. After '.', '::' or ':' Methods applicable to the object being
dereferenced, Symbols in the case of ':'
Notes:
- Vim will load/evaluate code in order to provide completions. This may
cause some code execution, which may be a concern.
- In context 2 above, anonymous classes are not supported.
- In context 3 above, Vim will attempt to determine the methods supported by
the object.
- Vim can detect and load the Rails environment for files within a rails
project. The feature is disabled by default, to enable it add
let g:rubycomplete_rails = 1
to your vimrc
== end
--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info
More information about the vim-ruby-devel
mailing list