neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

qml.vim (1071B)


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