Greetings noble vim users!
In .vim/ftplugin/python.vim, I have a number of Python related configurations,
including commands allowing me to call pyflakes and pylint on the current file.
These functions are described here:
http://www.jfroche.be/blogging/archive/2007/04/28/write-nicer-python-code. An
example:
command Pyflakes :call Pyflakes()
function! Pyflakes()
let tmpfile = tempname()
execute "w" tmpfile
execute "set makeprg=(pyflakes\\ " . tmpfile . "\\\\\\|sed\\ s@" . tmpfile
."@%@)"
make
cw
endfunction
The problem is that when I call vim opening multiple Python files, as soon as
the first is opened and the others start to open I get errors like:
Error detected while processing /home/sam/.vim/ftplugin/python.vim:
line 24:
E174: Command already exists: add ! to replace it
line 31:
E122: Function Pyflakes already exists, add ! to replace it
line 33:
E174: Command already exists: add ! to replace it
line 39:
E122: Function Pylint already exists, add ! to replace it
So it seems that all the applicable config is loaded per file sent to vim, and
after the first is loaded the above functions are already in place. Is there a
different way to define custom commands to get around this issue? It doesn't
affect the functionality, it's just an annoyance to wait for the errors to
disappear, especially when opening a number of files. And I'm also wondering if
I'm doing something wrong.
Thanks for any assistance,
Sam
_______________________
Samuel Huckins
Homepage - http://samuelhuckins.com
Tech blog - http://dancingpenguinsoflight.com/
Photos - http://www.flickr.com/photos/samuelhuckins/
Twitter - http://twitter.com/shuckins
AIM - samushack | Gtalk - samushack | Skype - shuckins
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---