Skip to content

Instantly share code, notes, and snippets.

@dahu
Forked from anonymous/gist:4150687
Created November 26, 2012 22:18
Show Gist options
  • Save dahu/4151037 to your computer and use it in GitHub Desktop.
Save dahu/4151037 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment