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