Skip to content

Instantly share code, notes, and snippets.

vnoremap <leader>d :call Test()<CR>gv"yp
function! Test()
"yank current visual selection to reg x
normal! gv"xy
"put new string value in reg y
let @y = " IF (DEBUG.GT.0) THEN\n" . @x . "\n ENDIF"
endfunction