Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion plugin/rooter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ if !exists('g:rooter_change_directory_for_non_project_files')
let g:rooter_change_directory_for_non_project_files = ''
endif

if !exists('g:rooter_change_directory_for_project_files')
let g:rooter_change_directory_for_project_files = 'root'
endif

if !exists('g:rooter_silent_chdir')
let g:rooter_silent_chdir = 0
endif
Expand Down Expand Up @@ -79,7 +83,12 @@ function! s:rooter()
return
endif

call s:cd(root)
if g:rooter_change_directory_for_project_files ==? 'root'
let dir = root
elseif g:rooter_change_directory_for_non_project_files ==? 'current'
let dir = s:current()
endif
call s:cd(dir)
endfunction


Expand Down