This is a clipboard thing - windows for instance copies stuff in many forms and 
pastes it in the form most acceptable to the receiving app - plaintext for vim, 
html/rtf for a word processor... Dunno if there's a way for vim to say "gimme 
html".

I would try looking at your browser. In firefox, for example, you can select a 
source editor in about:config

Set view_source.editor.external to true, and view_source.editor.path to your 
path to the vim binary.

Then when you do view source, it'll popup in vim. You can /search for the text 
you wanted, yank it with its enclosing html, and paste it into a split buffer. 
You can do all this without having to use the mouse (assuming you have a view 
source hotkey), so I don't think it's too cumbersome.

I know in lynx you can select a source editor as well, although I don't recall 
how right now, and probably in all other major browsers as well.

*tim* 

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kamaraju S Kusumanchi
Sent: Thursday, April 05, 2007 11:15 PM
To: vim@vim.org
Subject: copy pasting HTML code into vim

Let's say I open up a webpage, select some text and paste it into vim. Then all 
I see in vim is the text I see on the browser. While this is OK most of the 
times, sometimes I wish there is a way to paste the actual HTML code directly 
into the vim.

Selecting "view source of the webpage" and then copy pasting into vim will 
work. But it is very cumbersome and time consuming. So this is not an option 
for me.

Currently the editor in docs.google.com does what I need, Is there any way the 
same can be achieved by vim?

thanks
raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

Reply via email to