Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created September 24, 2014 14:47
Show Gist options
  • Save OliverUv/ea20c707471cb1ff355b to your computer and use it in GitHub Desktop.
Save OliverUv/ea20c707471cb1ff355b to your computer and use it in GitHub Desktop.
" Edit register
function! EditRegister()
call inputsave()
let l:reg = input("Enter a register: ")
call inputrestore()
execute "let l:cont = @" . l:reg . ""
return "let @" . l:reg . " = '" . l:cont . "'"
endfunction
nnoremap <leader>eq :<C-R>=EditRegister()<CR><C-E><C-F><Left>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment