FG

Prevent vim from clearing the clipboard on exit

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

Problem

If I copy text into the xterm clipboard from vim, it is cleared when I exit vim. How do I prevent this?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Prevent vim from clearing the clipboard on exit

Low Risk

I recently solved this problem with this single line in .vimrc (requires utility ): It stores current registry text to the clipboard buffer.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment