Code not indenting

13 views
Skip to first unread message

Legion

unread,
Oct 27, 2009, 10:12:51 PM10/27/09
to eclim-user
Hi, everything works perfect with eclim except for one thing. When
editing in vim the code gets no indentation at all, until I issue a :
%JavaFormat command.
I checked the EclimSetting and ProjectSettings for the
org.eclipse.jdt.core.formatter-* options and they are set to use tabs
with a size of 4, but still getting no indentation.
Any help would be very appreciated!

Eric Van Dewoestine

unread,
Oct 27, 2009, 11:19:38 PM10/27/09
to eclim...@googlegroups.com
On Tue, Oct 27, 2009 at 07:12:51PM -0700, Legion wrote:
>
> Hi, everything works perfect with eclim except for one thing. When
> editing in vim the code gets no indentation at all, until I issue a :
> %JavaFormat command.

Try adding the following to your ~/.vimrc (or $HOME/_vimrc on Windows)
and then restart vim to see if the code indents properly:

filetype plugin indent on

> I checked the EclimSetting and ProjectSettings for the
> org.eclipse.jdt.core.formatter-* options and they are set to use tabs
> with a size of 4, but still getting no indentation.

The jdt settings are only for when the code is being generated or
formatted via eclipse (:JavaFormat, :JavaGetSet, etc.). Those
settings don't affect the indenting as you type since vim will use its
own internal indent settings.

> Any help would be very appreciated!

Let me know if this resolves your issue, otherwise we'll dig in
further.

--
eric

Legion

unread,
Oct 28, 2009, 11:53:31 AM10/28/09
to eclim-user
":filetype plugin indent on" in .vimrc solved the problem.

Thank you very much!!!
Reply all
Reply to author
Forward
0 new messages