Implement auto-chdir option

This commit is contained in:
Ivan Tishchenko
2015-01-24 10:49:20 +03:00
parent 13e76aed2e
commit 0511b51a5f
3 changed files with 19 additions and 0 deletions

View File

@ -151,6 +151,10 @@ function! vimwiki#base#setup_buffer_state(idx) " {{{ Init page-specific variable
call VimwikiSet('invsubdir', vimwiki#base#invsubdir(subdir), a:idx)
call VimwikiSet('url', vimwiki#html#get_wikifile_url(expand('%:p')), a:idx)
if g:vimwiki_auto_chdir == 1
exe 'lcd' VimwikiGet('path')
endif
" update cache
call vimwiki#base#cache_buffer_state()
endfunction " }}}