Hi,

What I'm unable to do
 * attribute suggestion like function parameters
 * tooltip

I tried lots of different writings on the properties

autocomplete.hypertext.start.characters
calltip.hypertext.word.characters
calltip.hypertext.end.definition
calltip.hypertext.parameters.start calltip.hypertext.parameters.separators calltip.hypertext.parameters.end

But haven't found the right writing to make work an api file with lines
like

<xsl:template match="xpath"> Define an xpath handling template.

Spaces seems to confuse the entry helper.

Of course Scite can't do everything and stay small and efficient, but, I
would like to make it do all it can do.
May be some Scite guru could explain the best configuration ? A simple
and very common example for web developpers could also be

<a href="URL"> A link


Thanks for help, and be sure it will be done for community.


As far as I know, there is no way to display calltips with the standard SciTE API implementation. This is possible using lua however.

For example, check for a '>' in the OnChar event. Then you can search backwards for the matching '<' to get a string containing the tag and its attributes. Now it gets tricky. You can use some lua pattern matching to match a tag type (e.g. a href="url") and display an appropriate calltip via editor:CallTipShow.

so something like

if string.find(tag, '^a%s+href=([\'"]).-%1') then
        editor:CallTipShow(editor.CurrentPos, "A Link")
end

where tag is "a href='foobar'" etc.

The trick part is how the tag is structured if there are optional attributes specified, more than one attribute required, etc. Hopefully that gets you started however.

-Mitchell;

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to