Re: [code] a bug

From: Mitchell <m.att.foicica.com>
Date: Sat, 2 Feb 2013 13:36:48 -0500 (EST)

Hi John,

On Sat, 2 Feb 2013, John Ferrier wrote:

> [snip]
>
> The following is my  ".textadept/modules/cpp/post_init.lua
>
> -- Tabs and Indentation.
> buffer.tab_width = 4
> buffer.use_tabs = false
> buffer.indent = 4
> buffer.tab_indents = true
> buffer.back_space_un_indents = true
>

Try this instead:

   function _M.lua.set_buffer_properties()
     buffer.tab_width = 4
     buffer.use_tabs = false
     buffer.indent = 4
     buffer.tab_indents = true
     buffer.back_space_un_indents = true
   end

(From http://foicica.com/textadept/08_Preferences.html)

post_init.lua is only loaded once, when the cpp module is loaded.
`set_buffer_properties()` is called each time a cpp file is loaded.

Cheers,
Mitchell

-- 
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 Sat 02 Feb 2013 - 13:36:48 EST

This archive was generated by hypermail 2.2.0 : Sun 03 Feb 2013 - 06:31:26 EST