Pythonising the vim (e.g. syntax popups)

C

Christoph Haas

Evening,

I'm an addicted vim user and don't really use the IDLE for anything more
than calculations where I'm too lazy to start KCalc. But one feature is
very pretty: the built-in help for function calls while you type. Like you
enter...

var1,var2=mystring.split(
....and the IDLE shows me a popup saying...
"S.split([sep [,maxsplit]]) -> list of strings

Is there a decent way to get that help into vim? Or like showing docstrings
or help that I get through pydoc on request? I've been working myself
through a pile of vim macros/plugins but couldn't find even one which
simplifies programming in Python. Further issues would be handling the
indentation - maybe a plugin which syntax colors different levels of
indentation so I don't have to use my plastic ruler on the screen. ;)
Perhaps some more experienced Python/Vim users have a tip which macro sets
help most here.

Thanks,
Christoph
 
P

Paddy

Hi,
I am using gvim 6.4 which has Python colorising, and
The menu tools->folding->fold method->indent

:help folding
May give you more info.

Cheers, Paddy.
 
J

Jeffrey Schwab

Christoph said:
Evening,

I'm an addicted vim user and don't really use the IDLE for anything more
than calculations where I'm too lazy to start KCalc. But one feature is
very pretty: the built-in help for function calls while you type. Like you
enter...

var1,var2=mystring.split(
...and the IDLE shows me a popup saying...
"S.split([sep [,maxsplit]]) -> list of strings

Is there a decent way to get that help into vim? Or like showing docstrings
or help that I get through pydoc on request? I've been working myself
through a pile of vim macros/plugins but couldn't find even one which
simplifies programming in Python. Further issues would be handling the
indentation - maybe a plugin which syntax colors different levels of
indentation so I don't have to use my plastic ruler on the screen. ;)
Perhaps some more experienced Python/Vim users have a tip which macro sets
help most here.

Vim is my editor of choice, too. I've even gone back to Vim from Eclipse.

I believe what you want are "tags."

http://www.vmunix.com/vim/tags.html

I have not tried these in Vim yet, although I did use etags with Emacs
(before I discovered the miracle of Vim).

If you get context-sensitive help to work properly in Vim, please let me
know!
 
L

Lonnie Princehouse

There is a Python folding script, as someone already mentioned. That
will help you track indentation, although it's not perfect (iirc, long
triple quoted strings cause folding malfunctions)

I don't know of any way to get dynamic help about functions, although
it seems like an ideal use of Vim's built-in Python interpreter and the
vim python module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top