vim editor paste from clipboard without losing indentation

We often use the vim editor in the Linux operating system regularly and when we copy the paste some of the contents like yml and json

To avoid that you can use the below options to enter into the paste mode and exit from the paste mode

Entering Paste Mode

  • ESC
  • :set paste
  • press i
  • SHIFT + Insert (with a text copied on your clipboard)

Leaving Paste Mode

  • ESC
  • :set nopaste
  • press i

You pasted the text and you’re able to type again.

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like