Skip to content

Instantly share code, notes, and snippets.

@rasmusto rasmusto/fireplace.vim
Last active Dec 16, 2015

Embed
What would you like to do?
run clojure code from vim-fugitive buffer
function! s:repl.includes_file(file) dict abort
let is_zipfile = matchstr(a:file, '\C^zipfile:.*::')
let is_fugitive = matchstr(a:file, '\C^fugitive:\/\/.*')
if !empty(is_zipfile)
let file = substitute(a:file, '\C^zipfile:\(.*\)::', '\1/', '')
elseif !empty(is_fugitive)
let file = substitute(a:file, '\C^fugitive:\/\/\(.*\)', '\1', '')
let file = substitute(file, '\/\.git\/\/[^\/]\+', '', '')
else
let file = a:file
endif
for path in self.path()
if file[0 : len(path)-1] ==? path
return 1
endif
endfor
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.