Find absolute path in 'includeexpr'

The gf map is still necessary because Vim doesn't accept zipfile paths
as valid.
This commit is contained in:
Tim Pope 2014-07-03 10:02:34 -04:00
parent a1eef3dda1
commit 845b362a17

View File

@ -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 <silent> <Plug>FireplaceSplitFile :<C-U>exe <SID>GF('split', expand('
nnoremap <silent> <Plug>FireplaceTabeditFile :<C-U>exe <SID>GF('tabedit', expand('<cfile>'))<CR>
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