Monday, November 17, 2014

Re: cinoptions

Thanks Christian and Ethan! I was running a slightly different version of Vim on each machine. I updated the one that wasn't working the way I expected using homebrew and now it works!

On Mon, Nov 17, 2014 at 11:27 AM, Ethan Hereth <advocateddrummer@gmail.com> wrote:


On Mon, Nov 17, 2014 at 12:22 PM, Mark Volkmann <r.mark.volkmann@gmail.com> wrote:
On Sunday, November 16, 2014 9:38:18 PM UTC-6, Gary Johnson wrote:
> On 2014-11-16, Mark Volkmann wrote:
> > I want to set cinoptions so the following JavaScript function gets the
> > indentation shown.
> >
> > function foo(a, b,
> >   c, d) {
> >   return (a + b) / (c + d);
> > }
> >
> > Setting cinoptions to (1s gets me close, but the last two lines get indented by
> > one extra shiftwidth. I want the indentation of lines 3 and 4 to be based on
> > the beginning of the function on line 1, not the opening brace on line 2. Is
> > this possible?
>
> When I
>
>     :set cinoptions=(1s
>
> I get your desired result.  Do you have some other 'cinoptions'
> value(s) set as well?
>
> Regards,
> Gary

This is really weird! It is working the way I want on one Mac, but not on another. On both machines I can enter :set cinoptions in Vim and they both output this:
cinoptions=(1s,j1,J1

I don't know why I'm getting different results on the two machines.

I only set cinoptions to (1s in my .vimrc. I don't know where the j1,J1 part is coming from.

run the command ':verbose set cinoptions' to see where it is last set. There is probably a plugin that is setting it after you do. 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/GI-9SFISQIs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
R. Mark Volkmann
Object Computing, Inc.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment