[Geany] Use snippets for HTML autocompletion?

Nick Treleaven nick.treleaven at xxxxx
Fri Oct 22 12:38:42 UTC 2010


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.

> > 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.

Nick



More information about the Users mailing list