mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
ftplugin: Only load the python plugin once
This makes opening wiki pages significantly faster and also prevents clearing the entire cache every time.
This commit is contained in:
parent
b722c29f9e
commit
f3fe7aca21
3 changed files with 30 additions and 7 deletions
|
@ -21,11 +21,17 @@ if exists("g:taskwiki_disable")
|
|||
finish
|
||||
endif
|
||||
|
||||
" Determine the plugin path
|
||||
let s:plugin_path = escape(expand('<sfile>:p:h:h:h'), '\')
|
||||
if !exists("g:did_python_taskwiki")
|
||||
" Determine the plugin path
|
||||
let s:plugin_path = escape(expand('<sfile>:p:h:h:h'), '\')
|
||||
|
||||
" Execute the main body of taskwiki source
|
||||
execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/main.py'
|
||||
" Execute the main body of taskwiki source
|
||||
execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/main.py'
|
||||
|
||||
let g:did_python_taskwiki = 1
|
||||
endif
|
||||
|
||||
execute g:taskwiki_py . "WholeBuffer.update_from_tw()"
|
||||
|
||||
augroup taskwiki
|
||||
autocmd! * <buffer>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue