FG
💻 Software

How can I keep the code formatted as original source when I paste them to vim?

Fresh5 days ago
Mar 15, 202634744 views
Confidence Score0%
0%

Problem

When I copy some code from webpages and paste it to Vim, I find it becomes a mess, with a style like a ladder: Since it get messed like this so regularly, I think maybe there's something wrong with my , so I've pasted it below: Usually I write python in Vim, so proper indentation is critical.

Error Output

xxxxxx
   xxxxxx
      xxxxxx
         xxxxxxxxxx

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 keep the code formatted as original source when I paste them to vim?

Low Risk

Do this before: Then after:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment