r861 - in /trunk/utils/addons/src: ./ Makefile vim-addons vim/addon-manager.rb vim/registry.rb

zack at users.alioth.debian.org zack at users.alioth.debian.org
Sun Jan 21 11:33:48 UTC 2007


Author: zack
Date: Sun Jan 21 12:33:48 2007
New Revision: 861

URL: http://svn.debian.org/wsvn/?sc=1&rev=861
Log:
snapshot (usage string and draft of rdtool manpage)

Added:
    trunk/utils/addons/src/Makefile
Modified:
    trunk/utils/addons/src/   (props changed)
    trunk/utils/addons/src/vim-addons
    trunk/utils/addons/src/vim/addon-manager.rb
    trunk/utils/addons/src/vim/registry.rb

Propchange: trunk/utils/addons/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jan 21 12:33:48 2007
@@ -1,0 +1,1 @@
+vim-addons.1

Added: trunk/utils/addons/src/Makefile
URL: http://svn.debian.org/wsvn/trunk/utils/addons/src/Makefile?rev=861&op=file
==============================================================================
--- trunk/utils/addons/src/Makefile (added)
+++ trunk/utils/addons/src/Makefile Sun Jan 21 12:33:48 2007
@@ -1,0 +1,3 @@
+all: vim-addons.1
+vim-addons.1: vim-addons
+	rd2 -r rd/rd2man-lib -o $(basename $@) $<

Modified: trunk/utils/addons/src/vim-addons
URL: http://svn.debian.org/wsvn/trunk/utils/addons/src/vim-addons?rev=861&op=diff
==============================================================================
--- trunk/utils/addons/src/vim-addons (original)
+++ trunk/utils/addons/src/vim-addons Sun Jan 21 12:33:48 2007
@@ -1,5 +1,7 @@
 #!/usr/bin/ruby -w
-#--
+#
+# vim-addons: command line manager of Vim addons
+#
 # Copyright (C) 2007 Stefano Zacchiroli
 #
 # This program is free software, you can redistribute it and/or modify it under
@@ -7,50 +9,121 @@
 # Free Software Foundation; either version 2 of the License, or (at your
 # option) any later version.
 #
-# Created:	  Tue, 16 Jan 2007 10:04:20 +0100 zack
+# Created:    Tue, 16 Jan 2007 10:04:20 +0100 zack
 # Last-Modified:  $Id$
 #
-# TODO: implement usage string
 # TODO: support usage of system-wide plugins
 # TODO: create a vim-addons-manager package shipping vim-addons
-# TODO: rework the README.Debian ov vim-scripts pointing to vim-addons
-#
-#++
-# == Synopsis
-#
-# vim-addons: Vim add-ons manager
-#
-# == Usage
-#
-# vim-addons [OPTION ...] list
-# vim-addons [OPTION ...] status [ADDON ...]
-# vim-addons [OPTION ...] install ADDON ...
-# vim-addons [OPTION ...] remove ADDON ...
-# vim-addons [OPTION ...] disable ADDON ...
-# vim-addons [OPTION ...] amend ADDON ...
-# vim-addons [OPTION ...] files ADDON ...
-#
-# -h, --help
-#   show this usage message
-#
-# -s, --source-dir
-#   addons source directory
-#
-# -t, --target-dir
-#   target directory
-#
-# -r, --registry-dir
-#   registry directory
-#
-# == Author
-# Stefano Zacchiroli <zack at debian.org>
-#
-# == Copyright
-# Copyright (C) 2007 Stefano Zacchiroli
-# This program is free software, you can redistribute it and/or modify it under
-# the terms of the GNU General Public License version 2 as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
+# TODO: rework the README.Debian of vim-scripts pointing to vim-addons
+#
+
+=begin
+
+== NAME
+
+vim-addons - command line manager of Vim add-ons
+
+== SYNOPSIS
+
+vim-addons [OPTION ...] { list | status | install | remove | disable | amend | files } [ADDON ...]
+
+== DESCRIPTION
+
+Manage Vim addons installed system-wide, enabling on a per-user basis their
+installation, removal, ...
+
+vim-addons is capable of managing all Vim addons registered in the system-wide
+registry of Vim addons (see vim-registry(5)). Each system-wide addon can be,
+with respect to a user Vim configuration, in one of the following states:
+
+:installed
+  all of the files composing the addon are installed (i.e. symlinked) somewhere
+  under ~/.vim. The addon is fully functional for the current user
+
+:removed
+  the files composing the addon are not installed under ~/.vim. The addon might
+  still be working for the current user if it is installed system-wide by the
+  local administrator
+
+:disabled
+  the files composing the addon are not installed under ~/.vim, but the addon
+  is installed system-wide. However, the addon has been disabled for the
+  current user explicitely requiring so via some configuration line in
+  ~/.vim/plugin/vim-addons.vim. The addon is not working for the current user
+
+:broken
+  only some of the files composing the addon are installed under ~/.vim. The
+  addon is probably not working for the current user
+
+The following commands can be given to vim-addons to inspect or alter the
+status of the addons:
+
+:list
+  list, one per line, the names of the addons available in the system (i.e. of
+  all the addons mentioned in the registry, not necessarily of all enabled
+  addons)
+
+:status
+  show, one per line, the status of the addons available in the system. If one
+  or more addon arguments are specified only show the status of those addons
+
+:install
+  install one or more addons under ~/.vim. Requires at least one addon argument
+
+:remove
+  remove one or more addons from ~/.vim. Requires at least one addon argument
+
+:disable
+  disable one or more addons to be used by the current user. Usually used for
+  addons which are system-wide enabled by the local administrator but that the
+  current user does not want to be used. Using this command will automatically
+  change the content of ~/.vim/plugin/vim-addons.vim, probably adding let
+  definitions which will inhibit the given addon to be used. Requires at least
+  one addon argument
+
+:amend
+  undo the effects of a previous disable command. Requires at least one addon
+  argument
+
+:files
+  linst, one per line, the files composing the specified addons. Files are
+  listed relative to components of the Vim runtimepath (see 'runtimepath' in
+  the Vim help). Requires at least one addon argument
+
+== OPTIONS
+
+All commands accept the following options:
+
+:-h, --help
+  show this usage message and exit
+
+:-s, --source-dir
+  set the addons source directory (default: /usr/share/vim/addons)
+
+:-t, --target-dir
+  set the addons target directory (default: $HOME/.vim)
+
+:-r, --registry-dir
+  set the registry directory (default: /usr/share/vim/registry)
+
+== AUTHOR
+
+Stefano Zacchiroli <zack at debian.org>
+
+== SEE ALSO
+
+vim(1), vim-registry(5)
+
+== COPYRIGHT
+
+Copyright (C) 2007 Stefano Zacchiroli
+
+This program is free software, you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+=end
 
 $LOAD_PATH << File.join(ENV['HOME'], 'pkg-vim/utils/addons/src')
 
@@ -61,7 +134,19 @@
 require 'vim/registry'
 
 def die_usage
-  raise 'TODO: die_usage'
+  print <<EOS
+Usage:
+  vim-addons [OPTION ...] { list | status | install | remove | disable | amend | files } [ADDON ...]
+Options:
+  -h, --help          show this usage message and exit
+  -s, --source-dir    set the addons source directory
+                      (default: /usr/share/vim/addons)
+  -t, --target-dir    set the addons target directory
+                      (default: $HOME/.vim)
+  -r, --registry-dir  set the registry directory
+                      (default: /usr/share/vim/registry)
+EOS
+  exit 1
 end
 
 def parse_cmdline
@@ -75,16 +160,20 @@
     %w{install remove disable amend files}
   cmdline =
     GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
-		   ['--source-dir', '-s', GetoptLong::REQUIRED_ARGUMENT],
-		   ['--target-dir', '-t', GetoptLong::REQUIRED_ARGUMENT],
-		   ['--registry-dir', '-r', GetoptLong::REQUIRED_ARGUMENT]
-		  )
+                   ['--source-dir', '-s', GetoptLong::REQUIRED_ARGUMENT],
+                   ['--target-dir', '-t', GetoptLong::REQUIRED_ARGUMENT],
+                   ['--registry-dir', '-r', GetoptLong::REQUIRED_ARGUMENT]
+                  )
   cmdline.each do |opt, arg|
     case opt
-    when '--help' ; die_usage
-    when '--source-dir' ; options[:source_dir] = arg
-    when '--target-dir' ; options[:target_dir] = arg
-    when '--registry-dir' ; options[:registry_dir] = arg
+    when '--help'
+      die_usage
+    when '--source-dir'
+      options[:source_dir] = arg
+    when '--target-dir'
+      options[:target_dir] = arg
+    when '--registry-dir'
+      options[:registry_dir] = arg
     end
   end
   die_usage unless cmd = ARGV.shift

Modified: trunk/utils/addons/src/vim/addon-manager.rb
URL: http://svn.debian.org/wsvn/trunk/utils/addons/src/vim/addon-manager.rb?rev=861&op=diff
==============================================================================
--- trunk/utils/addons/src/vim/addon-manager.rb (original)
+++ trunk/utils/addons/src/vim/addon-manager.rb Sun Jan 21 12:33:48 2007
@@ -1,4 +1,3 @@
-#--
 # Copyright (C) 2007 Stefano Zacchiroli
 #
 # This program is free software, you can redistribute it and/or modify it under
@@ -7,7 +6,6 @@
 # option) any later version.
 #
 # $Id$
-#++
 
 require 'fileutils'
 

Modified: trunk/utils/addons/src/vim/registry.rb
URL: http://svn.debian.org/wsvn/trunk/utils/addons/src/vim/registry.rb?rev=861&op=diff
==============================================================================
--- trunk/utils/addons/src/vim/registry.rb (original)
+++ trunk/utils/addons/src/vim/registry.rb Sun Jan 21 12:33:48 2007
@@ -1,4 +1,3 @@
-#--
 # Copyright (C) 2007 Stefano Zacchiroli
 #
 # This program is free software, you can redistribute it and/or modify it under
@@ -7,7 +6,6 @@
 # option) any later version.
 #
 # $Id$
-#++
 
 require 'find'
 require 'set'




More information about the pkg-vim-maintainers mailing list