Module textredux
The Textredux module allows you to easily create text based interfaces for the Textadept editor and offers a set of text based interfaces.
It currently contains the following modules:
- textredux.core. The core module provides basic components to create text based interfaces.
- textredux.fs. Contains text based interfaces for file io operations, like open file, save file as well as snapopen functionality.
- textredux.ctags. Displays a filtered list of symbols (functions, variables, …) in the current document using Exuberant Ctags.
- textredux.buffer_list. A text based buffer list replacement, which in addition to being text based also offers an easy way to close buffers directly from the list.
How to use it
Download and put the Textredux module in your .textadept/modules/
directory.
Having installed it, there are two (mixable) ways you can use Textredux.
1) Select the functionality you want from the different modules by assigning keys to the desired functions.
local textredux = require('textredux') keys.co = textredux.fs.open_file keys.cS = textredux.fs.save_buffer_as keys.cb = textredux.buffer_list.show keys.cg = textredux.ctags.goto_symbol
2) If you can't get enough of text based interfaces and the joy they provide,
then the hijack function is for you. Simply place this in your
init.lua
:
require('textredux').hijack()
As the name suggest, Textredux has now hijacked your environment. All your regular key bindings should now use Textredux where applicable. Clicking the menu will still open the standard GUI dialogs.
Customizing
Please see the modules documentation for more configuration settings.
Functions
hijack () | Hijacks Textadept, replacing all keyboard shortcuts with text based counterparts. |