Re: [code] about indentation

From: John Ferrier <john_j_ferrier.att.yahoo.com>
Date: Mon, 29 Oct 2012 17:38:39 -0700 (PDT)

Mitchell, I am very sorry that I can't reproduce what I said either. Please forget it. Sorry again for wasting your time. JF ----- Original Message ----- From: Mitchell <m.att.foicica.com> To: "code.att.foicica.com" <code.att.foicica.com> 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 "test01.cc". > > 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 "foo.cc". 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 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 Mon 29 Oct 2012 - 20:38:39 EDT

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