Avoiding indentation of control statements when used in assignment

2010-10-17 Thread Sung Pae
I have a strong suspicion that this topic has been covered in the mailing list before, but I could not find it. So here is my question: Is there a way to nullify the indent level for continuation lines of a control statement when the result of the expression is assigned to a variable? For example

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Ben Fritz
On Oct 17, 4:39 pm, Sung Pae wrote: > I have a strong suspicion that this topic has been covered in the > mailing list before, but I could not find it. > > So here is my question: Is there a way to nullify the indent level for > continuation lines of a control statement when the result of the >

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Sung Pae
On 18 Oct 2010, at 9:48 AM, Ben Fritz wrote: > On Oct 17, 4:39 pm, Sung Pae wrote: >> For example, in Ruby one can assign the value of a `case' expression: >> >> myvar = case object >> when foo then bar >> when bar then baz >> end >> >> This is my preferred indent style for thi

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Charles Campbell
Sung Pae wrote: [snip] Thank you for your response. There is a separate indent file for ruby in VIMRUNTIME/indent, and the one for JavaScript essentially just does "setlocal cindent". I hoped that since the behavior is similar (unwanted indentation after an assignment), there was a global switch

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Sung Pae
On 18 Oct 2010, at 1:26 PM, Charles Campbell wrote: > Of course, since you "replied" to a thread about how to unsubscribe and > then changed the subject, and so doing put your question on that > "unsubscribing" thread, many people won't even notice your question. It's true, I regret this. I decid

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Ben Fritz
On Oct 18, 11:35 am, Sung Pae wrote: > > 'cinoptions' only makes a difference if 'cindent' is set. In your > > case, it is more likely you are using filetype-specific indent rules. > > There MIGHT be variables you can set with a :let command that > > customize the indent rules to some extent, se

Re: Avoiding indentation of control statements when used in assignment

2010-10-18 Thread Sung Pae
On 18 Oct 2010, at 2:25 PM, Ben Fritz wrote: > On Oct 18, 11:35 am, Sung Pae wrote: >>> 'cinoptions' only makes a difference if 'cindent' is set. >> There is a separate indent file for ruby in VIMRUNTIME/indent, and the >> one for JavaScript essentially just does "setlocal cindent". > > I had n