From 62da755350c57b425b67ca8ec9ccb22e61fbff61 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 9 Apr 2015 14:29:50 +0200 Subject: [PATCH] Fix for #122, don't claim ownership over directories --- autoload/vimwiki/base.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 8fa50b9..9f27519 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -965,7 +965,10 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) "{{{ " getpos() directly after this command. Strange. if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p'))) execute a:command.' '.fname - if &filetype != 'vimwiki' + " Make sure no other plugin takes ownership over the new file. Vimwiki + " rules them all! Well, except for directories, which may be opened with + " Netrw + if &filetype != 'vimwiki' && fname !~ '\m/$' set filetype=vimwiki endif endif