Permalink
Browse files

README updates

  • Loading branch information...
1 parent 049f1a7 commit 383f320f9bd4fb194285a8e179fc2876c888651c @rking committed with rking@sharpsaw.org Nov 27, 2012
Showing with 32 additions and 4 deletions.
  1. +8 −1 README.md
  2. +2 −0 README.md.erb
  3. +22 −3 Rakefile
View
@@ -57,10 +57,17 @@ Or, from within vim:
:colo detailed
+## Language Support So Far
+
+- Ruby: 107 details detailed.
+- C: 12 details detailed.
+- Diff: 10 details detailed.
+- Vim: 4 details detailed.
+
+
# rking/vim-detailed open issues
7: Warn if t_Co != 256
6: Pygments Companion
- 4: Languages other than Ruby
3: Distinguish Foo and Bar of "class Foo < Bar"
2: ` " ' distinction
1: "DATA" matching within words
View
@@ -2,4 +2,6 @@
<%= `rake parse_readme`.sub /Source repo.*/, '' %>
+<%= `rake lang_stats` %>
+
<%= `ghi list` %>
View
@@ -5,18 +5,37 @@ task :readme do
sh 'git diff'
end
+def detailed_dot_vim_contents
+ File.read 'colors/detailed.vim'
+end
+
def parse_readme
- text = File.read 'colors/detailed.vim'
+ text = detailed_dot_vim_contents
text.sub! /\n\n.*/m, ''
text.gsub! /^" ?/, ''
end
-
task :parse_readme do
puts parse_readme
end
+def lang_stats
+ text = detailed_dot_vim_contents
+ lang_specific_funcs = text.scan(
+ /fun! s:([^_]+)_syntax_and_highlights(.*?)endfun/m)
+ stats = lang_specific_funcs.map do |lang,body|
+ [lang.capitalize, body.split(/\n+/).size]
+ end.sort_by{|k,v| -v}.map do |lang, body_size|
+ "- #{lang}: #{body_size} details detailed."
+ end
+ (['## Language Support So Far', ''] + stats).join "\n"
+end
+task :lang_stats do
+ puts lang_stats
+end
+
task :vimorg do
- puts parse_readme + "\n\n" + `ghi list`
+ docs = parse_readme + "\n\n" + lang_stats + "\n\n" + `ghi list`
+ docs.gsub '##', '//'
url = 'http://www.vim.org/scripts/edit_script.php?script_id=4297'
warn url
system 'firefox', url

0 comments on commit 383f320

Please sign in to comment.