How to create new snippets for a file type?

From: phayz <russelldicken....at.gmail.com>
Date: Wed, 7 Apr 2010 22:51:12 -0700 (PDT)

As I have mentioned several times in postings to this group, I
commonly edit HTML files. I thought that it would be useful if I
created some personal snippets for 'hypertext' files so I did. However
when I am editing an HTML file, the snippets don't work - i.e. when I
have typed in the 'trigger' text and pressed [Tab], the trigger text
is not replaced with the snippet. In fact nothing happens, other than
a tab is entered in the current buffer.

To create the snippets file for hypertext-type documents I copied the
snippets.lua file from <prefix>\textadept\modules\lua and edited it so
that "lua" was replaced with "hypertext" and replaced the Lua snippets
with my personal snippets and saved the file to $HOME\.textadept
\modules\hypertext.

Below is the content of the snippets.lua file I created. Can anyone
see where I went wrong? Do I have the file in the wrong format or
perhaps the wrong location?

-- Copyright 2007-2010 Mitchell Foral mitchell<att>caladbolg.net. See
LICENSE.

---
-- Snippets for the hypertext module.
module('_m.hypertext.snippets', package.seeall)
local snippets = _G.snippets
if type(snippets) == 'table' then
  snippets.hypertext = {
    hh   = 'hello there',
  }
end
Received on Thu 08 Apr 2010 - 01:51:12 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:42:41 EST