Qwerky Software  -  Textadept History

Textadept Column Marks History Per-File Settings Rectangular Selection Smart Tabs Status Bar Take Command Lexer Menus and Keys Download Installation License Contact


Most editors include a Recent Files facility, providing the ability to quickly open a file which the editor has previously seen, and restoring that file's state (caret position, current window position, etc.).  Textadept also provides such a capability, but it is limited in these ways:  First, the number of files remembered is limited to ten (this number may be adjusted).  Second, the list of remembered files is session-based, meaning that one session's list is not available in another session.  For some purposes (or in the view of some users) this may be regarded as a feature, rather than a limitation.  Finally, the file's state is not remembered for the recent files (though of course it is for session files).

History History for Textadept provides a system-wide list of remembered files, not limited to a single session, including each file's state, and with a large upper limit to the number of files remembered.  This history of files does not interfere with Textadept's native facility, and both may be used at the same time.  History provides both a dialog in the same manner as Textadept, as well as a menu list, in the manner of many other editors.  Like other editors, any file in the menu (which is, of necessity, limited in number) may be quickly selected by an accelerator key.  Like Textadept itself, the dialog (which shows the entire history) may be used to quickly filter files by typing a few letters.

History History installs a sub-menu called Recent, at position four in Textadept's main File menu.  Both the name and position of the sub-menu may be altered by the user; I chose that name because it is standard, and I am used to the <Alt-F>, <R> key sequence to quickly access it.  The Recent menu is divided into two sections:  pinned and unpinned.  The unpinned section, as expected, is in most-recently-used order; when a file is opened which Textadept has not previously seen, it is added to the top of the unpinned section, pushing other entries down; and when a previously seen file is opened from the unpinned section of the history list, it is moved to the top of the unpinned section.  The pinned section, as the name implies, is more static:  files are added to, or removed from, that section only by direct user action, allowing the user to keep frequently accessed files at the top of the list, without them being pushed off the list as new files are added.  This pinned section is limited to ten files, using accelerator keys <1> through <0>.  The unpinned section is limited to twenty-six files, using accelerator keys <A> through <Z>.  The dialog, on the other hand, shows the entire history, and is limited only by the set maximum size, which the user may adjust.

History stores its history in a file called history in your /USERHOME/ directory (the same location as Textadept's default 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 Textadept's session remembers, but in a slightly different file format.  If the Column Marks module is loaded, History now additionally saves and restores the edge-mode, edge-column, edge-colour, column-mark-colour, and column-marks for each file.

History has been updated, and now also saves and restores the wrap mode and strip-trailing-spaces mode for each file.  It will automatically convert a history file in the old format, to the new format.

Of course the user may, by editing the code, adjust many parameters, such as the history filename and location, the menu name and position, key-bindings, and so on.  See the NOTES: section near the beginning of the history.lua file for settings you may wish to change.

    Version History:
  • 2019-09-13 Convert underscore characters to double-underscore in menu filenames, so that they are visible in menus.  Thanks to Pedro Andres Aranda Gutierrez for the fix.
  • 2019-09-03 Added save/restore of wrap mode and strip mode, and conversion of old-format history file.
  • 2019-07-31 Added save/restore of edge mode, edge column, edge colour, column mark colour, and column marks, when columnmarks.lua is loaded.  Added FILE_BEFORE_CLOSE event–to be effective, must also be added to /textadept/core/file_io.lua; see NOTES:.
  • 2019-07-17 Initial version.

To download History, visit the Download page.

For installation instructions, visit the Installation page.

Copyright © 2019-2020 by Qwerky.  All rights reserved worldwide.
 This page is:  http://qwerky.50webs.com/textadept/history.html.  Last Modified 2020 January 2.