summaryrefslogtreecommitdiffstats
path: root/ftplugin/openscad.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-06-09 17:00:24 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-06-09 17:00:24 +0200
commit7c474e5c9218d870dabba00745220dff5aa671b2 (patch)
tree0939e06ae13b4145bfb5e2fe98bf3c86ce491c2f /ftplugin/openscad.vim
parent1a096f0901264629947afb89436019895e5e7ef5 (diff)
downloadvim-polyglot-7c474e5c9218d870dabba00745220dff5aa671b2.tar.gz
vim-polyglot-7c474e5c9218d870dabba00745220dff5aa671b2.zip
Add OpenSCAD support, closes #702
Diffstat (limited to 'ftplugin/openscad.vim')
-rw-r--r--ftplugin/openscad.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/ftplugin/openscad.vim b/ftplugin/openscad.vim
new file mode 100644
index 00000000..3daa1687
--- /dev/null
+++ b/ftplugin/openscad.vim
@@ -0,0 +1,18 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'openscad', 'ftplugin/openscad.vim')
+ finish
+endif
+
+" Blatantly stolen from vim74\ftplugin\c.vim
+
+" Set 'formatoptions' to break comment lines but not other lines,
+" and insert the comment leader when hitting <CR> or using "o".
+setlocal fo-=t fo+=croql
+
+" Set 'comments' to format dashed lists in comments.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+
+" Win32 can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "OpenSCAD Source Files (*.scad)\t*.scad\n" .
+ \ "All Files (*.*)\t*.*\n"
+endif