Re: searchpair() problem
- Dnia poniedziałek, 30 stycznia 2006 15:51, hermitte@... napisał:
> > IIRC, I proceed in several steps, which are:
> > 1- search for pairs of brackets (I search for the opening bracket =>
> > backward search)
> > 2- check the scope associated to the bracket found (class, struct,
> > function, ...) -- there, getline() was my friend
> > 3- if this matches, then I do a forward searchpair on brackets (only),
> > Otherwise, I proceed recursively to step 1-
> Just another though on this issue.
> As your functions seems to always contain the "function" keyword, you
> can just: - First, do a backward searchpair using the pattern you tried
> to use in a forward search (don't forget to check whether the cursor was
> within a function scope)
> - Then do a forward search on brackets (only) to find the matching
> closing curly bracket.
> It is a little bit longer, but still easier than doing recursive searchs
> -- my aim was to determine the complete scope of classes and functions,
> hence the recursive search.
function arguments are accessible from inside of internal functions.
Recursive should be done. At the moment I decided not to do that.
sent it to Bram. Should be included in next snapshot of Vim7.
- function name
- function arguments
- properties of variables trying to detect type of variable
- complete HTML DOM objects and properties depending on context
- keywords of language
<script> tag of (X)HTML. Note: scanning will be only in scope of current
At the moment separate files are not taken into account.
At the moment (beginning of 2006) there are two main browsers - MS Internet
Explorer and Mozilla Firefox. These two applications are covering over 90%
market. Theoretically standards are created by W3C organisation
(http://www.w3c.org) but they are not always followed/implemented.
IE FF W3C Omni completion ~
+/- +/- + + ~
+ + - + ~
+ - - - ~
- + - - ~
Regardless from state of implementation in browsers but if element is
in standards, completion plugin will place element in suggestion list. When
both major engines implemented element, even if this is not in standards it
will be suggested. All other elements are not placed in suggestion list.