swift.vim (892B)
1 " This source file is part of the Swift.org open source project 2 " 3 " Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors 4 " Licensed under Apache License v2.0 with Runtime Library Exception 5 " 6 " See https://swift.org/LICENSE.txt for license information 7 " See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors 8 " 9 " Vim maintainer: Emir SARI <bitigchi@me.com> 10 " Last Change: 2021 Jan 08 11 " 2026 Jun 27 by Vim Project (add recommended style guard) 12 13 " Only do this when not done yet for this buffer 14 if exists("b:did_ftplugin") 15 finish 16 endif 17 18 let b:did_ftplugin = 1 19 let b:undo_ftplugin = "setlocal comments< expandtab< tabstop< shiftwidth< smartindent<" 20 21 setlocal comments=s1:/*,mb:*,ex:*/,:///,:// 22 if get(g:, 'swift_recommended_style', 23 \ get(g:, 'filetype_recommended_style', 1)) 24 setlocal expandtab 25 setlocal sw=4 sts=4 26 endif 27 setlocal smartindent