go.vim 569 B

12345678910111213141516171819202122232425
  1. " Vim filetype plugin file
  2. " Language: Go
  3. " Maintainer: David Barnett (https://github.com/google/vim-ft-go)
  4. " Last Change: 2014 Aug 16
  5. " 2024 Jul 16 by Vim Project (add recommended indent style)
  6. if exists('b:did_ftplugin')
  7. finish
  8. endif
  9. let b:did_ftplugin = 1
  10. setlocal formatoptions-=t
  11. setlocal comments=s1:/*,mb:*,ex:*/,://
  12. setlocal commentstring=//\ %s
  13. let b:undo_ftplugin = 'setl fo< com< cms<'
  14. if get(g:, 'go_recommended_style', 1)
  15. setlocal noexpandtab softtabstop=0 shiftwidth=0
  16. let b:undo_ftplugin ..= ' | setl et< sts< sw<'
  17. endif
  18. " vim: sw=2 sts=2 et