A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vim/vim/commit/bedc69f9d67b117ab05aa735c701cd3899d1ae2d below:

Missing QML support · vim/vim@bedc69f · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+1229

-0

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+1229

-0

lines changed Original file line number Diff line number Diff line change

@@ -192,6 +192,7 @@ runtime/ftplugin/ps1xml.vim @heaths

192 192

runtime/ftplugin/pymanifest.vim @ObserverOfTime

193 193

runtime/ftplugin/python.vim @tpict

194 194

runtime/ftplugin/qb64.vim @dkearns

195 +

runtime/ftplugin/qml.vim @ChaseKnowlden

195 196

runtime/ftplugin/r.vim @jalvesaq

196 197

runtime/ftplugin/racket.vim @benknoble

197 198

runtime/ftplugin/readline.vim @dkearns

@@ -284,6 +285,7 @@ runtime/indent/postscr.vim @mrdubya

284 285

runtime/indent/prolog.vim @dkearns

285 286

runtime/indent/ps1.vim @heaths

286 287

runtime/indent/qb64.vim @dkearns

288 +

runtime/indent/qml.vim @ChaseKnowlden

287 289

runtime/indent/r.vim @jalvesaq

288 290

runtime/indent/racket.vim @benknoble

289 291

runtime/indent/rapid.vim @KnoP-01

@@ -443,6 +445,7 @@ runtime/syntax/ps1xml.vim @heaths

443 445

runtime/syntax/psl.vim @danielkho

444 446

runtime/syntax/pymanifest.vim @ObserverOfTime

445 447

runtime/syntax/qb64.vim @dkearns

448 +

runtime/syntax/qml.vim @ChaseKnowlden

446 449

runtime/syntax/r.vim @jalvesaq

447 450

runtime/syntax/racket.vim @benknoble

448 451

runtime/syntax/raml.vim @in3d

Original file line number Diff line number Diff line change

@@ -1708,6 +1708,9 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python

1708 1708

" QL

1709 1709

au BufRead,BufNewFile *.ql,*.qll setf ql

1710 1710 1711 +

" QML

1712 +

au BufRead,BufNewFile *.qml,*.qbs setf qml

1713 + 1711 1714

" QMLdir

1712 1715

au BufRead,BufNewFile qmldir setf qmldir

1713 1716 Original file line number Diff line number Diff line change

@@ -0,0 +1,31 @@

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

Original file line number Diff line number Diff line change

@@ -0,0 +1,59 @@

1 +

" Vim indent file

2 +

" Language: QML

3 +

" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>

4 +

" Last Change: 2023 Aug 16

5 +

"

6 +

" Improved JavaScript indent script.

7 + 8 +

" Indent script in place for this already?

9 +

if exists("b:did_indent")

10 +

finish

11 +

endif

12 +

let b:did_indent = 1

13 +

let b:undo_indent = "setlocal indentexpr< indentkeys<"

14 + 15 +

setlocal indentexpr=s:GetQmlIndent()

16 +

setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=*/

17 + 18 +

" Only define functions once per session

19 +

if exists("*s:GetQmlIndent")

20 +

finish

21 +

endif

22 + 23 +

" Clean up a line of code by removing trailing '//' and '/* */' comments, and trimming

24 +

" whitespace

25 +

function! s:Trim(line)

26 +

return substitute(substitute(substitute(a:line, '// .*', '', ''), '/\* .* \*/', '', ''), '^\s*\|\s*$', '', 'g')

27 +

endfunction

28 + 29 +

function! s:GetQmlIndent()

30 +

let num = v:lnum

31 +

let line = s:Trim(getline(num))

32 + 33 +

let pnum = prevnonblank(num - 1)

34 +

if pnum == 0

35 +

return 0

36 +

endif

37 +

let pline = s:Trim(getline(pnum))

38 + 39 +

let ind = indent(pnum)

40 + 41 +

" bracket/brace/paren blocks

42 +

if pline =~ '[{[(]$'

43 +

let ind += &sw

44 +

endif

45 +

if line =~ '^[}\])]'

46 +

let ind -= &sw

47 +

endif

48 + 49 +

" '/*' comments

50 +

if pline =~ '^/\*.*\*/'

51 +

" no indent for single-line form

52 +

elseif pline =~ '^/\*'

53 +

let ind += 1

54 +

elseif pline =~ '^\*/'

55 +

let ind -= 1

56 +

endif

57 + 58 +

return ind

59 +

endfunction

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4