Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML indentation is 4 spaces #789

Open
nickjer opened this issue Jun 4, 2015 · 4 comments

Comments

@nickjer
Copy link

commented Jun 4, 2015

By default all my *.yml files are being indented by 4 spaces using spf13-vim. I'd like it to be 2 spaces.

I observed in the .vimrc file it is explicitly setting indentation to be 2 spaces for *.yml files:

https://github.com/spf13/spf13-vim/blob/3.0/.vimrc#L259

But I am seeing 4 space indentation. Is there a specific plugin that is changing it to 4? And how can I disable that plugin's feature.

@jasonshell

This comment has been minimized.

Copy link

commented Jul 3, 2015

The below snippet is in my .vimrc and properly indents .yml files in macvim.

" yaml indentation
au FileType yaml setlocal tabstop=2 expandtab shiftwidth=2 softtabstop=2

It appears your yaml rule has omitted tabstop=2 which vim uses for yaml to determine how many spaces per indent.

@jrobeson

This comment has been minimized.

Copy link
Collaborator

commented Oct 26, 2015

seems like this was solved?

@BretFisher

This comment has been minimized.

Copy link

commented Aug 14, 2016

Could it be that the actual FileType should be yaml but the spf13-vim/.vimrc has it as yml on several lines? If I manually set FileType to yml it won't parse correctly, so seems it should always be yaml.

@zx1986

This comment has been minimized.

Copy link

commented Oct 23, 2016

@BretFisher yeah, I got this issue too. *.yml always start a new line with tab indent ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.