Are these cinoptions possible?
Thanks for all the help so far, one question on formatting. I've read the help on cinoptions and I can't figure this one out. I like my Java like this: // WANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } I can't seem to get the indenting logic to not count the throws indent when figuring out the indent for the next line. The closest I can get is this: // UNWANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } Is it possible to set the cinoptions so that I can == a range and indent it as I'd like? -- - Eric
Re: Are these cinoptions possible?
I tried to indent your piece of code using vim, and obtained the indentation you like. So what's the difference between your and my configuration ? :filetype -- filetype detection:ON plugin:ON indent:ON :set filetype? -- filetype=java :set indentexpr? -- indentexpr=GetJavaIndent() If your configuration is different, try : :filetype plugin indent on and re-open your file. You should have the indent mode you like. I like my Java like this: // WANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } I can't seem to get the indenting logic to not count the throws indent when figuring out the indent for the next line. The closest I can get is this: // UNWANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } Is it possible to set the cinoptions so that I can == a range and indent it as I'd like? -- - Eric
Re: Are these cinoptions possible?
Hmm that works, I guess its the set cinoptions=:0g0 thing I'd set later on for just generic files. On 4/29/06, Jean-Emmanuel Reynaud [EMAIL PROTECTED] wrote: I tried to indent your piece of code using vim, and obtained the indentation you like. So what's the difference between your and my configuration ? :filetype -- filetype detection:ON plugin:ON indent:ON :set filetype? -- filetype=java :set indentexpr? -- indentexpr=GetJavaIndent() If your configuration is different, try : :filetype plugin indent on and re-open your file. You should have the indent mode you like. I like my Java like this: // WANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } I can't seem to get the indenting logic to not count the throws indent when figuring out the indent for the next line. The closest I can get is this: // UNWANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); } catch(IllegalArgumentException e) {} } Is it possible to set the cinoptions so that I can == a range and indent it as I'd like? -- - Eric -- - Eric