I need to replace guid_here
by different uuid.
provider [guid_here]
[guid_here] provider
test again [guid_here]
test again2 [guid_here]
test [guid_here] again2
I use this approach.
Install package "uuid" - UUID
I need create uuid exactly in the cursor place. To do this I create custom function:
(defun uuid-insert()
(interactive)
(require 'uuid)
(insert (upcase (uuid-string))))
and bind to key:
(global-set-key (kbd "C-c C-'") 'uuid-insert)
Also I need package multiple-cursor
multiple-cursor
and here steps.
- Select guid_here
- Use
mc/mark-all-like-this
- Press
Del
- Use my custom function
uuid-string
to insert uuid in every line. I must use keybinding for this -C-c C-'
. If use by function nameuuid-string
it's not work.
As you can see, now in every line has different uuid. Nice.
It's very cool.
Is it best approach to generate uuid in every lines?