Re: [code] about indentation

From: John Ferrier <>
Date: Mon, 29 Oct 2012 11:10:52 -0700 (PDT)

Let me double check it again on my personal laptop (Ubuntu 12.04 X86_64) on which TA is installed this evening. I'll let you know as soon as possible (The OS installed on my current working machine is very old and can't run the pre-compiled TA). Regards, JF ----- Original Message ----- From: Mitchell <> To: "" <> Cc: Sent: Monday, October 29, 2012 12:57 PM Subject: Re: [code] about indentation Hi John, On Mon, 29 Oct 2012, John Ferrier wrote: > Thank you, Mitchell. Actualy that's fine with me, and I feel sometime this maybe even better. > > > Another thing I observed while I was testing the auto indentation was, for example, if I launed a fresh TA (blank window without any file loaded), and I noticed the indentation in this case was "2". I typed some lines like: > > int main() > { >    printf("1\n"); >    return 0; > } > > There were 1 tab (= 2blanks) at the beginning of line 3 and 4, and finally I saved it as "". > > Because I had set the indentation for C/C++ as "4" in "~/.textadept/modules/cpp/post_init.lua", I expected the indentation shown on the status bar to be changed to "4" as well, but actually it was still "2". However, if I typed one more tab when I created that file, after saving it I saw on the status bar the indentation was updated to "4" as expected. If this was by design then I think it's actally better than what I expected, otherwise it is something else. I cannot reproduce this. I put the following in my cpp/post_init.lua:     function _M.cpp.set_buffer_properties()       buffer.tab_width = 4     end I opened a new instance of ta, typed your text (with indentation of "Spaces: 2"), and saved the file as "". The lexer immediately changed to "cpp" and my indentation settings also changed in the statusbar to "Spaces: 4". I must be misunderstanding your report. Mitchell

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 29 Oct 2012 - 14:10:52 EDT

This archive was generated by hypermail 2.2.0 : Tue 30 Oct 2012 - 06:42:51 EDT