Re: [code] Your uses of Textadept?

From: DrTebi <>
Date: Tue, 29 Dec 2015 23:55:50 -0800

Nice topic to chat about.

I use Textadept mostly for writing documentation. I write my
documentation in REStructuredText, or simply rest. The module that
comes with Textadept does most of everything I need already, I only
added a few shortcuts for convenience, and a function that converts
the rest document to HTML. That way, together with an CSS stylesheet,
I can quickly browse all my documentation with a web browser.

The function to convert the rest document into HTML is executed every
time I hit "save", and looks like this:

-- run rst2html after saving an .rst file
events.connect(events.FILE_AFTER_SAVE, function()
  if buffer:get_lexer() ~= 'rest' then return end
    local sh_cmd = '/usr/bin/rst2html --link-stylesheet
    local rst_path = buffer.filename
    local html_path = string.match(buffer.filename,

That snipped of code is saved in
~/.textadept/modules/rest/post_init.lua. It requires only the rst2html
binary to work.

I also use a "reload" add-on for Firefox, so that when I save the rest
document and the new HTML document is generated, the document in the
browser automatically reloads to let me see the changes (and possible

It works really well, and it's very helpful to have documentation. For
example, with my own documentation, it now takes me merely 15-20
minutes to setup Arch Linux with a desktop environment with sound etc.


On Tue, Dec 29, 2015 at 5:18 PM, Rena <> wrote:
> On Tue, Dec 29, 2015 at 3:13 PM, docmorchel . <> wrote:
>> Hi List,
>> Textadept is my preferred 'edc' editor, so to speak. I use it mainly to
>> write text and to script, however as it is scriptable there are numerous
>> other possibilities to use it. My question to you is: What are you using it
>> for apart from using it as a programming editor? Please comment!
>> Here is my share:
>> I use it as a (rather simple) project management tool.
>> The basic idea was to.. well there was no basic idea, I had to note
>> somewhere the hours I spent. It started with a text file (it still is). One
>> task per line with date, hours, project, task and activity separated by
>> semicolon. Over the time I added convenience stuff. A perl script that would
>> generate a latex-invoice from my hours-file. Later it became a python
>> script.
>> I added requests to separate things people want me to do (requests) from
>> things I actually do (tasks). Of course with a completely different syntax
>> just for fun (yet still one liners). I added syntax to write
>> multiline-comments below each task.
>> Then a few years ago I started to use Textadept.
>> As things became hard to read (tasks, requests, comments, different
>> syntax), the first thing to do was to create a lexer. Then snippets for
>> tasks, requests and comments and so on followed. I added a function to
>> extract project- and tasklists from highlighted text-regions or highlighted
>> projects. Then a function to list open requests sorted by priority in a new
>> buffer.
>> The company I work for uses dokuwiki as one of it's documentation-tools,
>> so I started to write my comments in wiki-syntax and added a (quite
>> incomplete) wiki-lexer. I added a function to aggregate comments of a
>> specific project or task in a new buffer with the wiki-lexer set. That's
>> when my hours-file became also a valuable documentation-tool. Finally I
>> replaced the python-invoice script with a lua-function. For the functions
>> there is key bindings and context menu entries. All of this was possible
>> because of Textadept. Very nice. And it was fun doing it!
>> So thanks to you Mitchell and to all contributors for this excellent tool.
>> Regards,
>> Martin
> I use Textadept for writing code, and for formatting things, since being
> able to extend the cursor to multiple lines is super handy.
> --
> Sent from my Game Boy.

"The bitterness of poor quality remains long after the sweetness of
low price is forgotten."
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 30 Dec 2015 - 02:55:50 EST

This archive was generated by hypermail 2.2.0 : Wed 30 Dec 2015 - 06:54:27 EST