diff --git a/doc/org.txt b/doc/org.txt index cec0812..2145c5e 100644 --- a/doc/org.txt +++ b/doc/org.txt @@ -1,4 +1,4 @@ -*org.txt* A minimal Org-mode package providing only the necessities. +*org.txt* A minimal Org-mode package providing only the necessities. Org.vim Manual by Alex Vear~ @@ -12,7 +12,7 @@ Welcome to the org.vim user manual. *org* *org.vim* *vim-o 4. Configuration .............................. |org-configuration| ============================================================================== - 1. INTRODUCTION *org-intro* + 1. INTRODUCTION *org-intro* Org.vim is a minimal Org-mode package for Vim. It provides only the absolute necessities (e.g. syntax highlighting and folding) at a high standard. @@ -33,6 +33,18 @@ WIP. ============================================================================== 4. CONFIGURATION *org-configuration* + *'g:org_state_keywords'* +Value: list of strings~ +Default: ['TODO', 'NEXT', 'DONE']~ + +To change the default state keywords set this variable to contain a list of +strings you would like to use. +> + let g:org_state_keywords = ['TODO', 'WAIT', 'DOING', 'DONE', 'CANCELED'] +< +Note: state keywords are case sensitive. + +------------------------------------------------------------------------------ *'g:org_use_italics'* Value: numeric~ Default: 0~ @@ -47,5 +59,17 @@ To enable this feature place the following line in your vimrc: > let g:org_use_italics = 1 < +------------------------------------------------------------------------------ + *'g:org_highlight_table_background'* +Value: numeric~ +Default: 1~ +This option allows you to disable the highlighting of table backgrounds, as +the default may not look great with your chosen `colorscheme`. + +To disable this feature place the following line in your vimrc: +> + let g:org_highlight_table_background = 0 +< +------------------------------------------------------------------------------ vim:et:ts=8:sts=4:sw=4:tw=78:ft=help:norl: diff --git a/plugin/org.vim b/plugin/org.vim new file mode 100644 index 0000000..a6d21e3 --- /dev/null +++ b/plugin/org.vim @@ -0,0 +1,9 @@ +" ============================================================= +" Description: Set default config options for org.vim +" Author: Alex Vear (axvr) +" Licence: ISC (2019) +" ============================================================= + +if !exists('g:org_state_keywords') + let g:org_state_keywords = ['TODO', 'NEXT', 'DONE'] +endif diff --git a/syntax/org.vim b/syntax/org.vim index d381913..784a0ac 100644 --- a/syntax/org.vim +++ b/syntax/org.vim @@ -67,8 +67,8 @@ syntax match orgHeading4 /^\s*\*\{4}\s\+.*$/ keepend contains=@Spell,orgTag,orgT syntax match orgHeading5 /^\s*\*\{5}\s\+.*$/ keepend contains=@Spell,orgTag,orgTodo syntax match orgHeading6 /^\s*\*\{6}\s\+.*$/ keepend contains=@Spell,orgTag,orgTodo syntax match orgTag /:\w\{-}:/ contained contains=orgTag -" TODO make these words configurable -syntax keyword orgTodo contained TODO NEXT DONE +exec 'syntax keyword orgTodo contained ' . join(g:org_state_keywords, ' ') + highlight def link orgHeading1 htmlH1 highlight def link orgHeading2 htmlH2 @@ -95,7 +95,9 @@ highlight def link orgHyperlink Underlined " Tables syntax match orgTable /^|.*$/ contains=@Spell,orgBold,orgItalic,orgUnderline,orgVerbatim,orgCode -highlight def link orgTable ColorColumn +if get(g:, 'org_hightlight_table_background', 1) + highlight def link orgTable ColorColumn +endif let b:current_syntax = 'org'