Skip to content

Instantly share code, notes, and snippets.



Forked from jonmorehouse/vimrc
Created Feb 4, 2019
What would you like to do?
UUID generator for vim. Inputs a uuid to copy buffer
fu! GenerateUUID()
python << EOF
import uuid
import vim
# output a uuid to the vim variable for insertion below
vim.command("let generatedUUID = \"%s\"" % str(uuid.uuid4()))
" insert the python generated uuid into the current cursor's position
:execute "normal i" . generatedUUID . ""
"initialize the generateUUID function here and map it to a local command
noremap <Leader>r :call GenerateUUID()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.