What I would like to do is following:

Do a visual selection in my text

Select a menu entry from my gvim menu which would start a python script.

This script should get the active selection and replace it with a new
string.

For the examples case let's assume I want to replace all 'a' characters
with 'A' characters.

With vim commands I would try to do something like:
:'<,'>s/a/A
# this works, but it would always assume a 'V' slection and not a 'v' #
# or Ctrl-v' selection


for external shell commands I could do
:'<,'>!sed 's/a/A/g'

Now my question would be how to do this with python scripting.
The reason is, that python scripting, can keep variable states accross
commands and that it could access all open buffers, etc.

-- 
You received this message from the "vim_use" 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

Reply via email to