andviro / flake8-vim

Pyflakes, Pep8 and mccabe code complexity checker for Vim, bundled with latest libraries for easy installation
63 stars 18 forks source link

Shift-q to autofix? #1

Closed maedox closed 11 years ago

maedox commented 11 years ago

If I read https://github.com/andviro/flake8-vim/commit/005ecfacffcbf28b80e5647f48b96e734c99fcb9 correctly, I should be able to select an error and press shift-q to fix it. If I for example remove the : after an if statement and run :PyFlake to get the error, then select the line with the error and press shift-q I get "syntax error". Any ideas? Did I misunderstand?

andviro commented 11 years ago

well, the 'invalid syntax' is a legend for syntax error on the line with the 'if'. For every line with W or E sign you will get an error message if you move and hold curson on it. As for shift-q, it will fix pep8 errors that can be auto-fixed. For example if you select the line with 'import os,path,sys' and press shift-q, it will be split into three separate import statements. I take it, there are no real vim error messages when you press shift-q?

maedox commented 11 years ago

Ah, I see, PEP8-issues are auto-fixed. The import example works. Thanks. Nope, no vim error, just the "invalid syntax".

andviro commented 11 years ago

Excellent. Anyway, it's an experimental feature and I expect some rough edges, so don't hesitate to open issue again in case of trouble. Thanks.