/ Published in: Textpattern

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
########################################################### ## DECLARATIONS IN SCITE PROPERTIES ########################################################### # define lua scripts ext.lua.startup.script=$(SciteUserHome)/.SciTEUser.lua # define entry in context menu user.context.menu=||Insert Snippet|1121|\ # define the command '21' command.name.21.*=Insert Snippet command.21.*=InsertSnip command.save.before.21.*=2 command.subsystem.21.*=3 command.replace.selection.21.*=0 ########################################################### ## DECLARATIONS IN $(SciteUserHome)/.SciTEUser.lua ########################################################### function capture(cmd) local f = assert(io.popen(cmd, 'r')) local s = assert(f:read('*a')) f:close() return s end function InsertSnip() editor:AddText(capture('gsnip')) end
Comments
