From 6fafac59fcfd441a5cddb052c763c380b0d9ebc9 Mon Sep 17 00:00:00 2001 From: Christopher Small Date: Mon, 3 Aug 2015 20:19:19 -0700 Subject: [PATCH] Attempts at uuid nonsense... --- vimrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/vimrc b/vimrc index 5e85a684ba..cb36e4697c 100644 --- a/vimrc +++ b/vimrc @@ -38,6 +38,7 @@ Plugin 'jistr/vim-nerdtree-tabs' Plugin 'sophacles/vim-processing' Plugin 'jceb/vim-orgmode' Plugin 'sunset' +Plugin 'kburdett/vim-nuuid' "" Clojure things "Plugin 'vimclojure' @@ -127,6 +128,7 @@ vmap ds :call DontStage() " Clojure fireplace etc goodies vmap e :Eval +vmap E :Eval! map E Ve map e :%Eval @@ -292,6 +294,32 @@ let g:sunset_longitude = -122.3331 let g:sunset_utc_offset = -8 + +"" Generate and insert uuids +"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())) + +"EOF + +"" insert the python generated uuid into the current cursor's position +":execute "normal i" . generatedUUID . "" + +"endfunction + +""initialize the generateUUID function here and map it to a local command +"map U :call GenerateUUID() + +let g:nuuid_no_mappings = 1 +map U Nuuid + + + "" The below was all snagged from janus. Moving away.. "" =================================================== ""