summaryrefslogtreecommitdiffstats
path: root/ftplugin
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-06-09 21:37:56 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-06-09 21:37:56 +0200
commit4899585281beab51e5dff1d9ae4d3159244a8275 (patch)
tree1624741b8d1a5366568addbb90b1119587636459 /ftplugin
parent4f997c5c82d49ce3e2791eb0679e992751bf39a7 (diff)
downloadvim-polyglot-4899585281beab51e5dff1d9ae4d3159244a8275.tar.gz
vim-polyglot-4899585281beab51e5dff1d9ae4d3159244a8275.zip
Add org mode, close #706
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/org.vim28
-rw-r--r--ftplugin/outline.vim23
2 files changed, 51 insertions, 0 deletions
diff --git a/ftplugin/org.vim b/ftplugin/org.vim
new file mode 100644
index 00000000..12711088
--- /dev/null
+++ b/ftplugin/org.vim
@@ -0,0 +1,28 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'org', 'ftplugin/org.vim')
+ finish
+endif
+
+" Vim filetype plugin for GNU Emacs' Org mode
+"
+" Maintainer: Alex Vear <av@axvr.io>
+" License: Vim (see `:help license`)
+" Location: ftplugin/org.vim
+" Website: https://github.com/axvr/org.vim
+" Last Change: 2020-01-04
+"
+" Reference Specification: Org mode manual
+" GNU Info: `$ info Org`
+" Web: <https://orgmode.org/manual/index.html>
+
+setlocal commentstring=#%s
+setlocal comments=fb:*,fb:-,fb:+,b:#,b:\:
+setlocal formatoptions+=ncqlt
+let &l:formatlistpat = '^\s*\(\d\+[.)]\|[+-]\)\s\+'
+
+setlocal foldexpr=org#fold_expr()
+setlocal foldmethod=expr
+
+if org#option('org_clean_folds', 0)
+ setlocal foldtext=org#fold_text()
+ setlocal fillchars-=fold:-
+endif
diff --git a/ftplugin/outline.vim b/ftplugin/outline.vim
new file mode 100644
index 00000000..4f0bbd65
--- /dev/null
+++ b/ftplugin/outline.vim
@@ -0,0 +1,23 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'org', 'ftplugin/outline.vim')
+ finish
+endif
+
+" Vim filetype plugin for GNU Emacs' Outline mode
+"
+" Maintainer: Alex Vear <av@axvr.io>
+" License: Vim (see `:help license`)
+" Location: ftplugin/outline.vim
+" Website: https://github.com/axvr/org.vim
+" Last Change: 2020-01-04
+"
+" Reference Specification: GNU Emacs Manual, section 'Outline Mode'
+" GNU Info: `$ info Emacs Outline Mode`
+" Web: <https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html>
+
+setlocal foldexpr=org#fold_expr()
+setlocal foldmethod=expr
+
+if org#option('org_clean_folds', 0)
+ setlocal foldtext=org#fold_text()
+ setlocal fillchars-=fold:-
+endif