Pass vim variable to python script

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pass vim variable to python script

Rick Dooling-2
So let's say I want the current line number in the Vim Buffer

let x=line(".")

And then I want to do something with it inside my Python script.
How do I refer to it?


function! Script()

let x=line(".")

python << EOF
import vim

?


EOF

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.