Improve Vim start-up time and allow buffer specific state keywords
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
" Set default configuration options for org.vim
|
" Helper functions for org.vim
|
||||||
"
|
"
|
||||||
" Maintainer: Alex Vear <av@axvr.io>
|
" Maintainer: Alex Vear <av@axvr.io>
|
||||||
" License: Vim (see `:help license`)
|
" License: Vim (see `:help license`)
|
||||||
" Location: plugin/org.vim
|
" Location: autoload/org.vim
|
||||||
" Website: https://github.com/axvr/org.vim
|
" Website: https://github.com/axvr/org.vim
|
||||||
" Last Change: 2019-09-22
|
" Last Change: 2019-09-22
|
||||||
|
|
||||||
@@ -10,7 +10,3 @@
|
|||||||
function org#option(name, default)
|
function org#option(name, default)
|
||||||
return get(b:, a:name, get(g:, a:name, a:default))
|
return get(b:, a:name, get(g:, a:name, a:default))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if !exists('g:org_state_keywords')
|
|
||||||
let g:org_state_keywords = ['TODO', 'NEXT', 'DONE']
|
|
||||||
endif
|
|
||||||
@@ -36,7 +36,7 @@ WIP.
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
4. CONFIGURATION *org-configuration*
|
4. CONFIGURATION *org-configuration*
|
||||||
|
|
||||||
*'g:org_state_keywords'*
|
*'b:org_state_keywords'* *'g:org_state_keywords'*
|
||||||
Value: list of strings~
|
Value: list of strings~
|
||||||
Default: ['TODO', 'NEXT', 'DONE']~
|
Default: ['TODO', 'NEXT', 'DONE']~
|
||||||
|
|
||||||
@@ -47,6 +47,9 @@ strings you would like to use.
|
|||||||
<
|
<
|
||||||
Note: state keywords are case sensitive.
|
Note: state keywords are case sensitive.
|
||||||
|
|
||||||
|
State keywords can be set on specific buffers by using |'b:org_state_keywords'|
|
||||||
|
rather than |'g:org_state_keywords'|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*'b:org_conceal_links'* *'g:org_conceal_links'*
|
*'b:org_conceal_links'* *'g:org_conceal_links'*
|
||||||
Value: numeric~
|
Value: numeric~
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ syntax match orgHeading5 /^\s*\*\{5}\s\+.*$/ keepend contains=@Spell,orgTag,orgT
|
|||||||
syntax match orgHeading6 /^\s*\*\{6,}\s\+.*$/ keepend contains=@Spell,orgTag,orgTodo
|
syntax match orgHeading6 /^\s*\*\{6,}\s\+.*$/ keepend contains=@Spell,orgTag,orgTodo
|
||||||
|
|
||||||
syntax match orgTag /:\w\{-}:/ contained contains=orgTag
|
syntax match orgTag /:\w\{-}:/ contained contains=orgTag
|
||||||
exec 'syntax keyword orgTodo contained ' . join(g:org_state_keywords, ' ')
|
exec 'syntax keyword orgTodo contained ' . join(org#option('org_state_keywords', ['TODO', 'NEXT', 'DONE']), ' ')
|
||||||
|
|
||||||
hi def link orgHeading1 Title
|
hi def link orgHeading1 Title
|
||||||
hi def link orgHeading2 orgHeading1
|
hi def link orgHeading2 orgHeading1
|
||||||
|
|||||||
Reference in New Issue
Block a user