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
Vim: textwidth setting ignored for Go #177
Comments
I can also reproduce. It's quite strange as |
I see what's happening. In
Which means |
Ah, well spotted! I can only assume that's in there because of this:
https://golang.org/doc/effective_go.html#formatting However, arguably |
@FND As I understand, go has no difference on line handling with C -- in theory they can both have infinite long lines. For me, the settings in Vim also doesn't make sense. A temporary solution would be delete the |
Well, it does make sense (and is perfectly valid too), there's just no specific recommendation at the language level (the same is true for JavaScript, Ruby etc.). That's the point of EditorConfig, isn't it: Agreeing on project-specific standards on top of what the language enforces. So I still consider this a bug in editorconfig-vim, as from a user's perspective, the |
I see the problem: |
Wow, you're right - I have no idea how that happened; I'd been using pretty much the same Thanks, and sorry for the trouble. |
When using Go, it appears something is overriding EditorConfig's
textwidth
setting.My
.editorconfig
file looks like this:This works as expected for other languages: e.g. opening a
.js
file results infiletype=javascript
andtextwidth=80
- yet opening a.go
file results infiletype=go
andtextwidth=0
.I'm insufficiently familiar with Vim's internals to guess what might be interfering there, but didn't see anything suspicious in
/usr/local/share/vim/vim74/ftplugin/go.vim
.The text was updated successfully, but these errors were encountered: