On 11/13/2011 01:27 AM, AK wrote:
> On 11/12/2011 06:49 PM, Gelonida N wrote:
>> On 11/12/2011 11:46 PM, AK wrote:
>> Knowing almost nothing about vim scripting,
>> but knowing basic vim commands and knowing python quite well
>> I was looking for the 'basic' commands, that would allow me to interact
>> with vim buffers and registers, (probably I still have to learn about
>> selections / marks)
>>
>> My thinking was, that if I can access, buffers, registers, marks
>> and if I can inject key strokes, that I should be able to
>> write almost anything, that I would like to do (even if there might be
>> more elegant solutions if I knew more of the vim scripting commands)
>>
>> One potential use case of setting a register would be to get
>> text from a selection, buffer, register, process it and dump the result
>> in the clipboard, such, that I could paste it into another application
>> (web browser / console window, whatever)
>> If I understood well I could do this by setting the '+' or '*' register.
> 
> 
> I mostly use command, eval, buffers, windows, current.buffer and
> current.line in vim python scripts.
> 
> From your earlier message: to get the selection, do something with it
> and replace with new text, just cut it to a register using "ax normal
> command, then simply insert new text at current cursor location.
> 
Thanks a lot for your last hint. :-)
This should do the trick (without having to set a register and without
having to escape any string.



-- 
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