[code] [textadept] History for TA

From: David Reimer <djreimer.att.gmail.com>
Date: Tue, 30 Jul 2019 16:19:30 +0100

> From: Qwerky <mr.qwerky.att.gmail.com>
> To: code.att.foicica.com
> Date: Sat, 27 Jul 2019 18:15:01 -0600
> Subject: [code] [textadept] History for TA
> Hello TA users,
> ... [snip] ....
> To install 'History', simply copy history.lua to your _USERHOME/modules/common directory (assuming a common directory in which all modules are automatically 'required'). 'History' stores its history in a file called 'history' in your _USERHOME directory (the same location as TA's session file). If 'History' cannot find its history file, it generates one, containing ten empty entries for the 'pinned' files. The history file contains, for each remembered file, the full path and file name, the caret position and selection anchor, and any bookmarks for the file. This is the same information that TA's session remembers, but in a slightly different file format. This is no coincidence, as 'History' is heavily based on TA's session.lua by Mitchell. Of course the user may, by editing the code, adjust many parameters, such as the history filename and location, the menu name and position, and so on.
> Feedback is welcome, not only with regard to program operation, but also with regard to the content of the code itself, as this is my first attempt at Lua programming for TA, and I am not yet entirely familiar with all of the conventions therein.

Hi qwerky -

Thanks for this! Sometimes the "Open Recent..." menu item gives me a
list I don't expect :) so I thought I would try out this module. It
looks promising, and it's nice to have those added features!

One thing about installation: I found I needed (?) to tweak things
slightly to get it to load properly:

1. Made "history" directory under my `/home/user/.textadept/modules`
directory (I'm on Ubuntu 18.04 LTS at the moment);
2. Copied your "history.lua" file into it, and renamed to "init.lua";
3. Added `_M.history = require('history')` to my user's "init.lua" file.

Then all worked as advertised. Thanks for sharing this!


You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 30 Jul 2019 - 11:19:30 EDT

This archive was generated by hypermail 2.2.0 : Wed 31 Jul 2019 - 06:48:22 EDT