Re: [go-nuts] vim setup for auto go fmt on save.

2016-10-12 Thread Fatih Arslan
As others said you can just add a command to BufWritePost. However don't forget that it's just runs it and is not able to capture any parse errors and show you. It also might replace your current buffer with the output of the error so you don't want it. Vim-go takes care of it and has many other

Re: [go-nuts] vim setup for auto go fmt on save.

2016-10-10 Thread Tarsis Azevedo
Fatih, vim-go author, wrote awesome tutorial about that. https://github.com/fatih/vim-go-tutorial/blob/master/README.md Tarsis Figueredo Azevedo. --- Celular: (21) 998524668 @tarsisazevedo --- On Mon, Oct 10, 2016 at 10:24 AM,

Re: [go-nuts] vim setup for auto go fmt on save.

2016-10-10 Thread 김용빈
Tank you Sander. I successfully installed and it works well. Still I want to know simple way though. If anyone knows about it, please let me know. :) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] vim setup for auto go fmt on save.

2016-10-10 Thread Sander van Harmelen
If you want to develop Go in vim, I would strongly suggest to just install and use the vim-go package/plugin. It will help you with a lot of stuff, but most can be turned of if you don’t want of need it. Sander On 10 Oct 2016, at 08:15: 49, 김용빈 wrote: Hello, How could I

[go-nuts] vim setup for auto go fmt on save.

2016-10-10 Thread 김용빈
Hello, How could I achieve auto go fmt on save in vim? (with 2~3 lines of code) I don't want install entire plug-in like vim-go. Or is it better to do? Thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this