Saturday, June 14, 2014

Re: How to adjust java indentation?

Many years later,

Did you find a solution that worked?

Your preferred indentation style is the same as mine but using PHP, trying to change the behavior has become a headache as the php.vim file specifies nocindent so i'm gathering cinoptions is obsolete in this case?

I don't want to change anything else other than stopping the closing brace from auto indenting left of the code block.

Does anyone here know of a solution?

thanks

tris

On Sunday, May 24, 2009 12:53:41 AM UTC+1, Bradley Jacobs wrote:
> Hi. I'm using vim to edit java programs, but one aspect of the
> automatic indenting is driving me crazy (it's all my fault, though,
> as I don't subscribe (in this case) with the accepted standard).
>
> Rather than have the closing brace of a block line up with the
> beginning of the statement which started the block, like this:
>
> void blah() {
> if (boolean) {
> stuff;
> }
> }
>
> I prefer the closing brace to be indented one step further
> to the right, lining up with the body of the block:
>
> void blah() {
> if (boolean) {
> stuff;
> }
> }
>
> Vim is driving me crazy by automatically left-shifting the closing
> brace from where I want it to be.
>
> I've tried various options, reading up on the various settings, but
> setting cindent values and the like doesn't seem to have any
> effect at all. Is there a whole different set of options for java
> syntax?
>
> Could someone please help me out, or tell me where to look?
>
> Thanks,
>
>
> Brad

--
--
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: