Yank entire file
问题 I often write something in gVim, then need to copy-paste it into another application. Is there an easy way to yank the entire file? I usually do something like this g g V G " + y (Go to top, visual-line mode, go to bottom, yank) But is there a better way that I'm missing out on? 回答1: I use the following instruction: :%y+ 回答2: ggyG (go to the first line, yank to the last line) Edit: Ah, system clipboard. Doesn't exactly roll off the fingers, but: gg"+yG 回答3: A working solution in old vi is :r