From 845b362a170696a717f6865061c57131025f4c71 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 3 Jul 2014 10:02:34 -0400 Subject: [PATCH] Find absolute path in 'includeexpr' The gf map is still necessary because Vim doesn't accept zipfile paths as valid. --- plugin/fireplace.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fireplace.vim b/plugin/fireplace.vim index 764b92e..8ebf6fd 100644 --- a/plugin/fireplace.vim +++ b/plugin/fireplace.vim @@ -1239,7 +1239,7 @@ function! fireplace#findfile(path) abort if a:path !~# '/' let path = tr(a:path, '.-', '/_') else - let path = substitute(a:path, '^/', '') + let path = substitute(a:path, '^/', '', '') endif let resource = fireplace#findresource(path, fireplace#path(), 0, &suffixesadd) if !empty(resource) @@ -1280,7 +1280,7 @@ nnoremap FireplaceSplitFile :exe GF('split', expand(' nnoremap FireplaceTabeditFile :exe GF('tabedit', expand('')) function! s:set_up_go_to_file() abort - setlocal includeexpr=tr(v:fname,'.-','/_') + setlocal includeexpr=fireplace#findfile(tr(substitute(v:fname,'/[^/.]*$','',''),'.-','/_')) if expand('%:e') ==# 'cljs' setlocal suffixesadd=.cljs,.cljx,.clj,.java else