blob: 75f78cfa4b90bbc2b2fd61dcf9999f9ddd120186 [file] [log] [blame]
Bram Moolenaarfb539272014-08-22 19:21:47 +02001" Vim filetype plugin file
2" Language: Go
3" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
4" Last Change: 2014 Aug 16
markmacode3e07d5a2024-07-16 21:20:34 +02005" 2024 Jul 16 by Vim Project (add recommended indent style)
Bram Moolenaarfb539272014-08-22 19:21:47 +02006
7if exists('b:did_ftplugin')
8 finish
9endif
10let b:did_ftplugin = 1
11
12setlocal formatoptions-=t
13
14setlocal comments=s1:/*,mb:*,ex:*/,://
15setlocal commentstring=//\ %s
16
17let b:undo_ftplugin = 'setl fo< com< cms<'
18
markmacode3e07d5a2024-07-16 21:20:34 +020019if get(g:, 'go_recommended_style', 1)
20 setlocal noexpandtab softtabstop=0 shiftwidth=0
21 let b:undo_ftplugin ..= ' | setl et< sts< sw<'
22endif
23
Bram Moolenaarfb539272014-08-22 19:21:47 +020024" vim: sw=2 sts=2 et