Прикручиваем pep8.py к vim

Список несоответствий кода PEP8, который генерирует pep8.py, можно прикрутить к vim. Он будет выводиться в небольшом окошке, при нажатии enter на выделенной строке, переходит на соотв. строку исходника(как от команды :grep, см. скриншот).

Скрипт для vim лежит тут. Я на него наткнулся когда написал аналогичный свой;) Правда мой умеет еще искать во всех файлах в каталоге.

Если это нужно кому-нибудь, делается это так:

function! Pep8all()
  let oldGrepPrg=&grepprg
  let &grepprg='pep8 --filename="*py" .'
  execute "grep"
  let &grepprg=oldGrepPrg
  cw    
endf
command! Pep8all call Pep8all()
Add post to:   Delicious Reddit Slashdot Digg Technorati Google
Make comment

Comments

О, спасибо, очень хелпфул.

freelance writer

freelance writer

freelance writer

Ah, very nice post. It had me thinking that if I weren’t so prone to not leaving comments, I’d be compelled not to tell you what a great site this is. Whatcha think about that??

Your post has impressed me cause it’s done well. Thanks to writers so much

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image