On Tuesday, April 23, 2013 11:27:33 AM UTC-5, A HV wrote:
> On Tuesday, 23 April 2013 17:02:12 UTC+2, Ben Fritz  wrote:
> > On Tuesday, April 23, 2013 9:30:52 AM UTC-5, A HV wrote:
> > > Hello all,
> > > Is it possible and how to set up a Color Scheme for HTML documents?
> > > I use curl | vim to open HTML URLs by Vim but it is in HTML code. Is it 
> > > possible to switch between the HTML code and formated document in Vim? 
> > > Like eLinks does for saving HTML pages like formated document :).
> > > Thanks
> > > Anton
> > 
> > You are NOT asking for a color scheme. I don't know why you would have 
> > thought that.
> > 
> > You're asking Vim to parse HTML like a web browser. Vim does not and 
> > probably can not do that.
> > 
> > For VERY simple HTML documents it might be possible to hack together a 
> > syntax script using the 'conceal' feature to hide the HTML tags and format 
> > text with bold, italics, and underline. It MIGHT be further possible to 
> > colorize the text. But you probably cannot support all possible 24-bit 
> > colors and their various combinations with bold, underline, italic, etc. 
> > with a static syntax script.
> > 
> > If you're just trying to view the text, you can either use syntax 
> > highlighting to conceal all HTML tags (and maybe replace some common 
> > character entities with their character), or pipe it through a text web 
> > browser like eLinks on the way to Vim.
> 
> Hello Ben Fritz,
> 
> I make notes for my studies (for example the way like Vim help organized), 
> Why HTML, it is because a lot of information is on-line and HTML has much 
> more possibilities than text. I would like to get the information in native 
> format (HTML or other in case of another language) in Vim for editing and the 
> same time formated to be able to read it like normal text document in Vim. 
> Something like interactive notebook.
> 
> I had set up color scheme for Vim by Yakov Lerner.
> ScrollColors : Colorsheme Scroller, Chooser, and Browser 
> http://www.vim.org/scripts/script.php?script_id=1488
> It works well, I am looking for the second part of my interactive book a 
> switch to get HTML to formated text feature. I will check for the 'conceal' 
> feature and hide, show by color possibility.
> Thank you for advise.   
> 
> Anton

Ok, but a colorsheme is just colors. It has no affect whatsoever on what text 
is displayed. You're basically asking "how do I set the background color of my 
desktop to allow me to play games?" The two are completely unrelated.

I still don't understand your use case. Are you looking for a way to edit 
formatted text within Vim? Maybe try the txtfmt plugin: 
http://www.vim.org/scripts/script.php?script_id=2208

If you want to later export your txtfmt file into HTML, Vim's :TOhtml command 
can do that for you.

If you want nice bullets, etc. as well then I'd suggest just using nice 
characters for it.

Unicode offers a huge range of them, some of which I use often enough I've even 
created my own digraphs for them (:help digraph):

digraph li 8226 " Bullet
digraph l1 8226 " level-1 bullet
digraph l2 8227 " level-2 bullet
digraph l3 8728 " level-3 bullet

These allow me to type CTRL+K li, l1, l2, or l3 to insert: •, •, ‣, or ∘into my 
text.

You can make this better by setting your 'formatlistpat' option to include 
these for automatic list formatting. Here's how I do that (plus a few other 
characters I like to use for bullets and the like sometimes):

  scriptencoding utf-8
  let &l:formatlistpat='^\s*\%(\d\+[\]:.)}\t ]\d\@!\|[•‣∘—–»*†×✓✗↳-]\)\s*'

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

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


Reply via email to