I want to paste something I have cut from my desktop into a file open in Vi.
But if I paste the tabs embed on top of each other across the page.
I think it is some sort of visual mode change but can’t find the command.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re using plain vi:
You probably have
autoindenton. To turn it off while pasting:I have in my
.exrcthe following shortcuts:Note that these have to be the actual control characters – insert them using Ctrl–V Ctrl–P and so on.
If you’re using vim:
Use the
pasteoption. In addition to disablingautoindentit will also set other options such astextwidthandwrapmarginto paste-friendly defaults:You can also set a key to toggle the paste mode. My
.vimrchas the following line: