nvim: mkdir debugger input folder
This commit is contained in:
parent
18aeacdcba
commit
2f133e087a
@ -28,9 +28,12 @@ nnoremap <silent> <leader>de :call vimspector#Reset()<cr>
|
|||||||
|
|
||||||
" write clipboard into input file
|
" write clipboard into input file
|
||||||
function WriteInput()
|
function WriteInput()
|
||||||
let inputfile=$HOME .. "/.cache/termdebug/input/" .. expand("%:r")
|
let inputfolder=$HOME .. "/.cache/termdebug/input/" .. expand("%:h")
|
||||||
echo "Input written to '" .. inputfile .. "'."
|
silent exec "!mkdir -p " .. inputfolder
|
||||||
|
let inputfile=inputfolder .. "/" .. expand("%:t:r")
|
||||||
call writefile(getreg('+', 1, 1), inputfile)
|
call writefile(getreg('+', 1, 1), inputfile)
|
||||||
|
" for some reason this line causes a Press Enter to continue
|
||||||
|
"echo "Input written to '" .. inputfile .. "'."
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <silent> <leader>rw :call WriteInput()<cr>
|
nnoremap <silent> <leader>rw :call WriteInput()<cr>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user