I’m using a python library. I don’t know about the indentation that the writer of that file used.
With gvim i press o and start writing python as indent on in .vimrc.
But if i copy and paste python code in pastebin.com i see indentation difference and get error.
How can i fix python indentation problem in gvim?
Very likely, your source file contains both
tabs andspaces.spaces are the preferred indentation method. (From PEP8)You can convert all
tabs tospaces by using those command:I suggest put those commands bellow in your
.vimrc: