Technology Insights

Gentoo: Paste Into Vi Issue, Each Line Gains More Spaces To The Left

My Linux distribution of choice is CentOS so that is where I typically spend time. Recently though I have been working for a project that runs on a Gentoo Linux server. So far I really like Gentoo though there are some things that I am used to that are totally different. One minor issues I have had is how vi/vim (vi IMproved) handles text that is pasted into it. Every time I was pasting data into a file I was editing with vi. Initially I thought it must have been some odd formatting coming from the file I was copying the text from however I ruled this out quickly when I pasted into notepad first to remove all formatting and then into vi and sure enough the spaces on the left still existed. Below I explain the issue, provide an image of a shell window showing the issue, and how to resolve the problem.