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

style: use two spaces for all files #915

Merged
merged 1 commit into from
Jun 25, 2016
Merged

style: use two spaces for all files #915

merged 1 commit into from
Jun 25, 2016

Conversation

fatih
Copy link
Owner

@fatih fatih commented Jun 25, 2016

I had enough of dealing with various styles in our VimL files. We had a
mix of tabs and spaces over all files. Some were using tabs, some were
using 4 spaces.

From now on the official vim-go style will be the following settings:

shiftwidth=2
tabstop=2
expandtab

The modeline for this setting is:

" vim: sw=2 sw=2 et

I've added the modeline for all files and reformatted all the files
again. Some might not like the two space setting, but that's ok. The
official Vim runtime files are usually like this, and the vim style
guide from Google also uses two spaces for indents (no tabs).

If someone wants to set a autocmd, this can be used as well:

autocmd BufNewFile,BufRead *.vim setlocal expandtab shiftwidth=2 tabstop=2

I had enough of dealing with various styles in our VimL files. We had a
mix of tabs and spaces over all files. Some were using tabs, some were
using 4 spaces.

From now on the official vim-go style will be the following settings:

```
shiftwidth=2
tabstop=2
expandtab
```

The modeline for this setting is:

```
" vim: sw=2 sw=2 et
```

I've added the modeline for all files and reformatted all the files
again. Some might not like the two space setting, but that's ok. The
official Vim runtime files are usually like this, and the vim style
guide from Google also uses two spaces for indents (no tabs).

If someone wants to set a autocmd, this can be used as well:

```
autocmd BufNewFile,BufRead *.vim setlocal expandtab shiftwidth=2 tabstop=2
```
@fatih
Copy link
Owner Author

fatih commented Jun 25, 2016

To see the diff with whitespace ignored checkout: https://github.com/fatih/vim-go/pull/915/files?w=1

@fatih fatih merged commit 1a9cc78 into master Jun 25, 2016
@fatih fatih deleted the indentations-fixes branch June 25, 2016 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant