blob: fd5ddbb4bc2abea389477496538d2249f7d542d8 [file] [log] [blame]
ChaseKnowldenbedc69f2023-08-20 19:08:28 +02001" Vim filetype plugin file
2" Language: QML
3" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
4" Last Change: 2023 Aug 16
5
6if exists( 'b:did_ftplugin' )
7 finish
8endif
9let b:did_ftplugin = 1
10
11let s:cpoptions_save = &cpoptions
12set cpoptions&vim
13
14" command for undo
15let b:undo_ftplugin = "setlocal formatoptions< comments< commentstring<"
16
17if (has("gui_win32") || has("gui_gtk")) && !exists( 'b:browsefilter' )
18 let b:browsefilter =
19 \ 'QML Files (*.qml,*.qbs)\t*.qml;*.qbs\n' .
20 \ 'All Files\t*\n'
21endif
22
23" Set 'comments' to format dashed lists in comments.
24setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
25setlocal commentstring=//%s
26
27setlocal formatoptions-=t
28setlocal formatoptions+=croql
29
30let &cpoptions = s:cpoptions_save
31unlet s:cpoptions_save