summaryrefslogtreecommitdiffstats
path: root/ftplugin
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2015-10-10 17:25:38 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2015-10-10 17:25:38 +0200
commita0c79360edaad50966bdc1ac537d0b7ee048a515 (patch)
tree295c1af426f8056da56373844ef1cf8ddd9e2211 /ftplugin
parent2d3b20bc68d43d23c7c66d56c84b509ad2fcd7ee (diff)
downloadvim-polyglot-a0c79360edaad50966bdc1ac537d0b7ee048a515.tar.gz
vim-polyglot-a0c79360edaad50966bdc1ac537d0b7ee048a515.zip
Add qml support, closes #69
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/qml.vim41
1 files changed, 41 insertions, 0 deletions
diff --git a/ftplugin/qml.vim b/ftplugin/qml.vim
new file mode 100644
index 00000000..1e0373d2
--- /dev/null
+++ b/ftplugin/qml.vim
@@ -0,0 +1,41 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
+
+" Vim filetype plugin file
+" Language: qml
+" Last change: 2014 Feb 8
+
+if exists( 'b:did_ftplugin' )
+ finish
+endif
+let b:did_ftplugin = 1
+
+let s:cpoptions_save = &cpoptions
+set cpoptions&vim
+
+" command for undo
+let b:undo_ftplugin =
+ \ 'let b:browsefilter = "" | ' .
+ \ 'setlocal ' .
+ \ 'comments< '.
+ \ 'commentstring< ' .
+ \ 'formatoptions< ' .
+ \ 'indentexpr<'
+
+if has( 'gui_win32' )
+\ && !exists( 'b:browsefilter' )
+ let b:browsefilter =
+ \ 'qml files (*.qml)\t*.qml\n' .
+ \ 'All files (*.*)\t*.*\n'
+endif
+
+" Set 'comments' to format dashed lists in comments.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//%s
+
+setlocal formatoptions-=t
+setlocal formatoptions+=croql
+
+let &cpoptions = s:cpoptions_save
+unlet s:cpoptions_save
+
+endif