Re: [code] [textadept] Add encoding

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 27 Aug 2013 15:15:35 +0200

Am 8/27/13 2:47 PM, schrieb A.M. Genaev:
> I want to add additional encoding.
> I try to add string
> io.encodings[#io.encodings + 1] = 'KOI8-R'
> into .textadept/init.lua file, but no new encoding appears in the menu Buffer-
> Encoding.
> Help, please.
>
Textadept is quite dynamic but not *that* dynamic, so it doesn't pick up
changes automatically. You could copy Textadept's 'menu.lua' to a
'~/.textadept/modules/textadept' directory and add your encodings to it.
This might require that you occasionally update it if Textadept's
'menu.lua' changes.

An alternative could be to simply call
_M.textadept.keys.utils.set_encoding('KOI8-R')

You could also assign that to a keyboard shortcut, e.g. for Ctrl-8:
keys.c8 = function() _M.textadept.keys.utils.set_encoding('KOI8-R') end

Hope this works.
Robert

-- 
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 27 Aug 2013 - 09:15:35 EDT

This archive was generated by hypermail 2.2.0 : Wed 28 Aug 2013 - 06:25:31 EDT