Is it possible to do something like: :g/\(\w+\) .*/python foo(\1)
and then have all the matching lines changed to the output of the python foo() function? For example, +-------------------------------- we are on line one we are on line two +-------------------------------- and given def foo(x): return len(x) we get 2 are on line one 2 are on line two since the matching part ("we") has two letters. I hope that made some sense. The main thing is to somehow pull out the matching part in the \(\w+\) and feed it into some other Python function. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---