Re: Change Tab Setting

From: Robert <ro....at.web.de>
Date: Tue, 4 May 2010 11:40:38 +0200

On Tue, May 4, 2010 at 5:11 AM, Ryan Pusztai <rpusz....at.gmail.com> wrote:
> Hi Mitchell,
>
> On Mon, May 3, 2010 at 8:40 PM, mitchell <mforal.n....at.gmail.com> wrote:
>>
>> Hi Ryan,
>>
>> >
>> > Is there a way to set the tab settings (width, use tabs, indent, etc)
>> > other
>> > than editing the theme? If not, how can I make these changes user
>> > specific
>> > (inside my ~/.textadept/...)?
>>
>> Lua command: buffer.use_tabs = 1
>>
>> ~/.textadept/:
>>
>> textadept.events.add_handler('buffer_new', function() buffer.use_tabs
>> = 1 end)
>
> What file should this go in? init.lua
> --
> Regards,
> Ryan
>
> --
init.lua should work. If you wanted to avoid editing a theme file in
order not to have these changes overwritten in an update you can copy
a theme directory to ~/.textadept/themes and create a file called
"theme" with the name of the theme in it. Then you can edit this
theme.
Another possibility if you want language specific settings is in the
language module files.
For example I have two spaces as a default but like to have 4 spaces
when editing Python. In the init.lua of the module I have the final
function like this:

function set_buffer_properties()
  buffer.indent = 4
end

Robert

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
Received on Tue 04 May 2010 - 05:40:38 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:44:49 EST