mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-20 10:36:25 +00:00
f3fd89af54
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
31 lines
1 KiB
Diff
31 lines
1 KiB
Diff
diff --git a/autoload/medieval.vim b/autoload/medieval.vim
|
|
index eee3adc..91e99b9 100644
|
|
--- a/autoload/medieval.vim
|
|
+++ b/autoload/medieval.vim
|
|
@@ -1,3 +1,4 @@
|
|
+let s:tempfile = fnamemodify(tempname(), ':h') . '/medieval'
|
|
let s:fences = [{'start': '[`~]\{3,}'}, {'start': '\$\$'}]
|
|
let s:opts = ['name', 'target', 'require', 'tangle']
|
|
let s:optspat = '\(' . join(s:opts, '\|') . '\):\s*\([0-9A-Za-z_+.$#&/-]\+\)'
|
|
@@ -196,18 +197,9 @@ function! s:callback(context, output) abort
|
|
call append(tstart + 1, a:output)
|
|
endif
|
|
else
|
|
- " Open result in scratch buffer
|
|
- if &splitbelow
|
|
- botright new
|
|
- else
|
|
- topleft new
|
|
- endif
|
|
-
|
|
- call append(0, a:output)
|
|
- call deletebufline('%', '$')
|
|
- exec 'resize' &previewheight
|
|
- setlocal buftype=nofile bufhidden=delete nobuflisted noswapfile winfixheight
|
|
- wincmd p
|
|
+ " Open result in preview window
|
|
+ call writefile(a:output, s:tempfile)
|
|
+ exec 'pedit ' . s:tempfile
|
|
endif
|
|
endfunction
|
|
|