Re: [code] [textadept] Line wrapping on a per-buffer/file-type basis

From: Mitchell <>
Date: Sat, 23 Nov 2013 10:18:32 -0500 (EST)

Hi Ethan,


On Sat, 23 Nov 2013, Ethan M. wrote:

> Hi,
> New to Textadept. After some reading and experimenting, I was wondering if
> it is possible to set line wrapping on a per-buffer or per-filetype basis.
> It doesn't seem to be the case. I'm curious because I would want text files
> to wrap by default, but not code files. Thanks.

Putting the following in your `~/.textadept/init.lua` should work:

   events.connect(events.LEXER_LOADED, function(lexer)
     buffer.wrap_mode = lexer == 'text' and buffer.WRAP_WORD
                                        or buffer.WRAP_NONE


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 23 Nov 2013 - 10:18:32 EST

This archive was generated by hypermail 2.2.0 : Sun 24 Nov 2013 - 06:48:06 EST