[Geany] Use snippets for HTML autocompletion?

Eugene Arshinov earshinov at xxxxx
Sat Oct 23 13:44:18 UTC 2010


On Fri, 22 Oct 2010 13:38:42 +0100%
Nick Treleaven <nick.treleaven at btinternet.com> wrote:

> On Fri, 22 Oct 2010 12:51:10 +0400
> Eugene Arshinov <earshinov at gmail.com> wrote:
> 
> > > > The suggestion is to make use of snippets: if "table" or
> > > > "<table>" snippet is specified in [HTML] section of
> > > > snippets.conf, the snippet is automatically inserted, otherwise
> > > > <table> tag is just closed, like other tags now.  This should
> > > > also work for any other tag.
> > > > 
> > > > Though, you can just define a snippet (say, "table") and use it
> > > > when you want to insert a table.  I doubt it's worth
> > > > implementing the suggestion if everything it gives is the
> > > > ability to type "<table>" instead of typing "table" and
> > > > pressing complete-snippet keybinding.
> > > 
> > > Perhaps the behaviour could be moved to the 'HTML chars' plugin,
> > > which could be renamed HTML or Markup.
> > 
> > Geany will have to notify the plugin about every char added.  Won't
> > it be too "heavy" to send a signal in this case?
> 
> Actually, this is already done for that plugin. See the editor-notify
> signal.
> 

Nice, I'll look at it sometime.

> > > We could add a 'table' snippet. With the <> angle brackets you
> > > would probably get the automatic closing tag before pressing tab
> > > to complete the snippet.
> > 
> > I think it's reasonable to remove "autotable" and add "table"
> > snippet instead.
> 
> Perhaps this is better because then the user can decide when to use
> the completion, instead of always. Patch welcome.

Attached :)

Best regards,
Eugene.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geany.23.remove_autotable.r5298.patch
Type: text/x-patch
Size: 2680 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20101023/f4d84651/attachment.bin>


More information about the Users mailing list