=p
from vim-unimpaired
function Scene:get(...)
local l = {}
for i, e in ipaires(self.nodelist) do
if (e:is(...)) then
l[#l +1] = e
end
end
return l
end
Yank word
function
with
yiw
Now the unnamed register containsfunction
(verify with:reg "yiw
)=p
from unimpaired inserts with reindentation after the current line.Fix missing blank line with [-Space (also only with vim-unimpaired)
This is more impressive if you insert several lines from a register. For example, yank full function with yG
in step 1 and then do steps 2 and 3.