@@ -0,0 +1,667 @@
+%22%22%22Run autopep8 on the selected buffer in Vim.%0A%0Amap %3CC-I%3E :pyf %3Cpath_to%3E/autopep8_vim.py%3CCR%3E%0A%0A%22%22%22%0A%0Aimport autopep8%0Aimport vim%0A%0A# TODO: Find out how to get the actual encoding from Vim.%0Aencoding = 'utf-8'%0Aoptions = autopep8.parse_args(%5B'--range',%0A                               str(vim.current.range.start),%0A                               str(vim.current.range.end),%0A                               ''%5D)%5B0%5D%0A%0Asource = '%5Cn'.join(vim.current.buffer).decode(encoding) + '%5Cn'%0Aformatted = autopep8.fix_string(source, options=options)%0A%0Aif source != formatted:%0A    vim.current.buffer%5B:%5D = %5Bline.encode(encoding)%0A                             for line in formatted.splitlines()%5D%0A

Add example of how to use autopep8 in Vim