Reputation: 559
I often do these commands together:
"gg, dG, i, shift+insert" (to replace everything to my clipboard text)
I feel like something absolutely can be combined together. I'm not quite following the vim functions instruction.
Is it possible to do something with ':gg dG i...' like? So whenever I type ":" editor mode, I can use up arrow key to use the last command i used.
Upvotes: 1
Views: 979
Reputation: 94706
Try
ggdG"*p
See bullet 7 about registers "*
and "+
. Try one or the other.
Upvotes: 0
Reputation: 7627
You could combine the various commands in a map, for example gy
:
nnoremap gy ggdGi<c-r>+<esc>
This copies the contents of the clipboard register (:help "+
)
Upvotes: 2