FG

How do I select all text in Vi/Vim?

Fresh3 days ago
Mar 15, 2026905553 views
Confidence Score1%
1%

Problem

Using VI tool for editing config files. How can I select all the text in a file (around 1000 lines), copy it, then paste into Google Docs?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I select all text in Vi/Vim?

Low Risk

The simplest and fastest way is to use: : % y + and then go over to Google Docs (or wherever) and paste. Explanation: % to refer the next command to work on all the lines y to yank those lines + to copy to the system clipboard Another way is g g " + y G but you will likely admit that the above is faster and easier.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment