FG

How can I select and delete lines of text in vi?

Fresh3 days ago
Mar 15, 2026114605 views
Confidence Score0%
0%

Problem

If I want to select particular text of line and delete lines, how can I do that in vi (give the simplest means)?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I select and delete lines of text in vi?

Low Risk

You can also use in view mode to launch "VISUAL LINE" mode. Select your lines and type to delete them.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment