Vim package control, tools, improvements, bullshit

This commit is contained in:
Gregory Eremin
2013-01-20 13:39:11 +04:00
parent f3123a736d
commit 3181ab8f19
15 changed files with 502 additions and 12 deletions
Executable
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
files = `du -k -d 1`.scan(/(\d+).*\.\/(.*)/)
maxlen = files.max_by{ |f| f[1].length }[1].length
files.sort_by{ |f| f[0].to_i }.reverse.each do |f|
name = f[1]
size = f[0].to_i
print "%-#{maxlen+1}s" % name
if size < 1024
puts "#{size}K"
else
puts "#{size / 1024}M"
end
end