mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
ftplugin: Minor cleanup
This commit is contained in:
parent
94fe6ed8e8
commit
92785f10f7
1 changed files with 6 additions and 6 deletions
|
@ -31,6 +31,10 @@ if !exists("g:did_python_taskwiki")
|
|||
let g:did_python_taskwiki = 1
|
||||
endif
|
||||
|
||||
" Global update commands
|
||||
execute "command! -buffer -nargs=* TaskWikiBufferSave :" . g:taskwiki_py . "WholeBuffer.update_to_tw()"
|
||||
execute "command! -buffer -nargs=* TaskWikiBufferLoad :" . g:taskwiki_py . "WholeBuffer.update_from_tw()"
|
||||
|
||||
augroup taskwiki
|
||||
autocmd! * <buffer>
|
||||
" Update to TW upon saving
|
||||
|
@ -45,16 +49,12 @@ augroup taskwiki
|
|||
|
||||
" Refresh on load (if possible, after loadview to preserve folds)
|
||||
if has('patch-8.1.1113') || has('nvim-0.4.0')
|
||||
execute "autocmd BufWinEnter <buffer> ++once :" . g:taskwiki_py . "WholeBuffer.update_from_tw()"
|
||||
autocmd BufWinEnter <buffer> ++once TaskWikiBufferLoad
|
||||
else
|
||||
execute g:taskwiki_py . "WholeBuffer.update_from_tw()"
|
||||
TaskWikiBufferLoad
|
||||
endif
|
||||
augroup END
|
||||
|
||||
" Global update commands
|
||||
execute "command! -buffer -nargs=* TaskWikiBufferSave :" . g:taskwiki_py . "WholeBuffer.update_to_tw()"
|
||||
execute "command! -buffer -nargs=* TaskWikiBufferLoad :" . g:taskwiki_py . "WholeBuffer.update_from_tw()"
|
||||
|
||||
" Split reports commands
|
||||
execute "command! -buffer -nargs=* TaskWikiProjects :" . g:taskwiki_py . "SplitProjects(<q-args>).execute()"
|
||||
execute "command! -buffer -nargs=* TaskWikiProjectsSummary :" . g:taskwiki_py . "SplitSummary(<q-args>).execute()"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue