Changeset 4864

Show
Ignore:
Timestamp:
01/18/08 14:12:01 (10 months ago)
Author:
yhara
Message:

lang/ruby/vimcolor: add some documentation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/vimcolor/README

    r3734 r4864  
    33 
    44A ported version of Perl's Text::VimColor to Ruby. 
     5 
     6This library tries to markup text files according to their syntax using vim. 
     7It can be used to produce web pages with pretty-printed colourful source code samples. 
     8 
     9You need Vim installed. 
     10 
     11 
     12Synopsis 
     13======== 
     14 
     15   require 'vimcolor' 
     16    
     17   vc = VimColor.new 
     18   xml = vc.run_file("foo.rb",  
     19                     {:filetype => 'ruby',      #default: auto detect 
     20                      :encoding => 'utf-8'},    #default: utf-8 
     21                     'xml')                     #can be 'xml', 'html', 'ansi', 
     22                                                #  default is 'ansi' 
     23 
     24Command-line Tool 
     25================= 
     26A simple source code highlighter is included as a sample script. 
     27 
     28eg. 
     29 $ ruby -Ilib vimcolor-embed lib/vimcolor.rb 
     30 $ ruby -Ilib vimcolor-embed lib/vimcolor.rb -f html > vimcolor.html 
     31 
     32use '-h' option for more information. 
     33 
     34 
     35Links 
     36===== 
     37Information about original Perl's Text::VimColor 
     38 
     39* http://search.cpan.org/~geoffr/Text-VimColor-0.11/lib/Text/VimColor.pm 
     40 
     41Svn repository (hosted by coderepos.org) 
     42 
     43* http://coderepos.org/share/browser/lang/ruby/vimcolor 
    544 
    645