On 04/16/2011 02:17 AM, Ben Finney wrote:
Emacs can run Python in a buffer, and has “tabbar-mode” to
display a row of tabs
Likely the same features are available in Vim, by I've never
used Vim for lots of Python coding.
Vim since v7 has offered tabs, though I personally stick mostly
to split-panes ("windows" in vim parlance).
:help tab-page
The GUI version (gvim) offers mouse support; the console version
supports the mouse as well, but may be a bit more fiddly as
mouse/console interactions often are.
:help mouse-using
As for running a python shell within Vim, the idea of an embedded
pseudo-tty (so that means an embedded console, python shell, or
just running any other console program) has been pretty
resolutely rejected by the maintainers. I think there's an
unofficial patch[1] to add the support, but most folks just bring
up a second console/terminal and run things there. For me, it's
either using "screen" or just another xterm/rxvt window.
:help shell-window
That said, Vim does have Python scripting capabilities as well,
so you can control vim with Python code
:help python
and Vim can evaluate python if it was built as such (check the
output of ":version" for "+python"). Additionally, you can
always run your Vim script and pull the output into a buffer
somewhere:
:r !my_script.py
:r !python my_script.py
(form dependent on whether your script is marked executable)
To the OP, try both Vim & Emacs and see which fits your head
better. They're both great editors and will provide a lifetime
of returns on the time invested learning them. Vim fits me
better; Emacs seems to better fit several of the other folks on
the list who responded.
-tkc
[1]
http://www.wana.at/vimshell/
http://stackoverflow.com/questions/2782752/how-can-i-open-a-shell-inside-a-vim-window
--
http://mail.python.org/mailman/listinfo/python-list