Re: [code] about indentation

From: John Ferrier <john_j_ferrier.att.yahoo.com>
Date: Mon, 29 Oct 2012 08:34:15 -0700 (PDT)

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. Thank you, JF ----- Original Message ----- From: Mitchell <m.att.foicica.com> To: "code.att.foicica.com" <code.att.foicica.com> Cc: Sent: Monday, October 29, 2012 10:06 AM Subject: Re: [code] about indentation John, On Sat, 27 Oct 2012, John Ferrier wrote: > > > Hi Mitchell: > > did you mean "Simplified auto-indent; modules/textadept/editing.lua"? That doesn't help - I also compiled textadept using the latest source code in hg and got the same result. After looking into this more, this functionality is by design. The documentation for _M.textadept.editing.AUTOINDENT is "Match the indentation level of the previous line when pressing the `Enter`". This is what you are seeing, even though it's not what you expect. The expected behavior should probably be in the cpp language module, but I will not be working on it. I'm open to a patch, though. 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.

-- 
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 - 11:34:15 EDT

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