Turning off auto indent when pasting text into vim
- by Rimian
Unfortunately, I am not an experienced vim user. But, I am making the effort to learn it.
When I paste code into my document from the clipboard, I get extra spaces at the start of each new line:
line
line
line
I know you can turn off auto indent but mine doesn't seem to work because I have some other settings conflicting or something (which look pretty obvious in my .vimrc but don't seem to matter when I take them out).
Can someone please show me the way to turn this off when I paste code but still have vim auto indent when I am writing code? Please see my .vimrc file:
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
set bg=dark
set nowrap
Many thanks