Working on the Python code-base with a VIM-based setup
Hello pydev, This is a meta-question which I hope is appropriate in this list (**). Recently I've switched to to VIM as my main development platform (in terms of code editing and navigation). Working on the Python code-base is both a concrete requirement and a yardstick for me - I want to be as effective as possible at it. Therefore I would like to ask those of you working on Python's code with VIM about your setups - the special tweaks to VIM & plugins you use to make working with the code as simple and effective as possible. Myself, since I'm still a VIM newbie, my setup is quite spartan. I created tags with: ctags -R Grammar Include Modules/ Objects/ Parser/ Python/ And now happily browse around the source code with Ctrl-], Ctrl-I/O, Ctrl-T and so on. I've also installed the Taglist plugin to show all functions/macros in open buffers - it's sometimes helpful. Other plugins I've found useful ar NERD-commenter (for commenting out chunks of code) and highlight_current_line (for a visual cue of where I am in a file). Besides, I've taken the suggested settings from the .vimrc file in Misc/ to help enforcing PEP-8. I heard that there are more sophisticated tags plugins that also allow one to check where a function is called for, and other intellisens-y stuff, though I'm not sure whether anyone uses it for Python's code. Thanks in advance, Eli (**) Note that it deals with the source code *of Python* (the stuff you download from Python's official SVN), not Python source code.
On Wed, Sep 01, 2010 at 06:41:00AM +0300, Eli Bendersky wrote:
I would like to ask those of you working on Python's code with VIM about your setups - the special tweaks to VIM & plugins you use to make working with the code as simple and effective as possible.
You have already seen Misc/Vim directory in Python distribution, have you? Shameless plug: look at my .vimrc and plugins: http://phd.pp.ru/Software/dotfiles/vimrc.html http://phd.pp.ru/Software/dotfiles/vim/ Borrow whatever you find useful. Oleg. -- Oleg Broytman http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Another shameless plug: My pyflakes.vim plugin will highlight errors as you type: http://www.vim.org/scripts/script.php?script_id=2441 It's really helpful for catching those typos that you usually don't notice until the runtime NameError. Eli Bendersky wrote:
Hello pydev,
This is a meta-question which I hope is appropriate in this list (**). Recently I've switched to to VIM as my main development platform (in terms of code editing and navigation). Working on the Python code-base is both a concrete requirement and a yardstick for me - I want to be as effective as possible at it. Therefore I would like to ask those of you working on Python's code with VIM about your setups - the special tweaks to VIM & plugins you use to make working with the code as simple and effective as possible.
Myself, since I'm still a VIM newbie, my setup is quite spartan. I created tags with:
ctags -R Grammar Include Modules/ Objects/ Parser/ Python/
And now happily browse around the source code with Ctrl-], Ctrl-I/O, Ctrl-T and so on. I've also installed the Taglist plugin to show all functions/macros in open buffers - it's sometimes helpful. Other plugins I've found useful ar NERD-commenter (for commenting out chunks of code) and highlight_current_line (for a visual cue of where I am in a file). Besides, I've taken the suggested settings from the .vimrc file in Misc/ to help enforcing PEP-8.
I heard that there are more sophisticated tags plugins that also allow one to check where a function is called for, and other intellisens-y stuff, though I'm not sure whether anyone uses it for Python's code.
Thanks in advance, Eli
(**) Note that it deals with the source code *of Python* (the stuff you download from Python's official SVN), not Python source code.
participants (3)
-
Eli Bendersky
-
Kevin Watters
-
Oleg Broytman