annotate runtime/ftplugin/kotlin.vim @ 33592:a17961ec19fa

Added tag v9.0.2040 for changeset 288da62613ba97c17ce63e2683bf8fe2015cb94e
author Christian Brabandt <cb@256bit.org>
date Tue, 17 Oct 2023 11:15:10 +0200
parents c9c720360002
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33282
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim filetype plugin file
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: Kotlin
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Alexander Udalov
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " URL: https://github.com/udalov/kotlin-vim
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " Last Change: 7 November 2021
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " 2023 Sep 17 by Vim Project (browsefilter)
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 if exists('b:did_ftplugin') | finish | endif
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 let b:did_ftplugin = 1
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 let s:save_cpo = &cpo
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 set cpo&vim
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 setlocal commentstring=//\ %s
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 setlocal formatoptions-=t formatoptions+=croqnl
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 silent! setlocal formatoptions+=j
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 setlocal includeexpr=substitute(v:fname,'\\.','/','g')
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 setlocal suffixesadd=.kt
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 let b:undo_ftplugin = "setlocal comments< commentstring< ".
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 \ "formatoptions< includeexpr< suffixesadd<"
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 let b:browsefilter = "Kotlin Source Files (*.kt, *kts)\t*.kt;*.kts\n" .
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 \ "All Files (*.*)\t*.*\n"
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 let b:undo_ftplugin .= " | unlet! b:browsefilter"
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 endif
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 let &cpo = s:save_cpo
c9c720360002 runtime(kotlin): Add Kotlin runtime files (#13110)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 unlet s:save_cpo