Yank a whole file in Vim.
Most people use
ggVG"y+
to yank the whole file which is highly inefficient.
A much faster way is to use
:%y+
You can easily map it for faster use:
map <Leader>y :%y+<cr>
Makes copying the whole file much faster!
Written by Lyuben
Related protips
2 Responses
I would rather use <Leader>fy
as <Leader>y
is nicer to have binded to "+y
.
over 1 year ago
·
Hm that's a nice idea actually
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#