Merge pull request #113 from t7ko/auto-cd

Option to enable auto-change-dir when opening a wiki index page with <Leader>ww
This commit is contained in:
Ivan
2015-02-04 23:58:04 +03:00
3 changed files with 20 additions and 0 deletions

View File

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