写了个简单的 VIM Plugin: HeaderCVS

Release Page:http://www.vim.org/scripts/script.php?script_id=2121


HeaderCVS : Auto generate CVS Header before current cursor

Created by
AyuanX

Script type
utility

Description
This plugin adds CVS Header before current cursor.
The CVS Header will automatically reflect current file name, current date and your description beside a standard CVS Header.
(Note: This plugin is only tested on **Linux**.)

For example:
If you type “:HeaderCVS This is my file description.” when editing file “Demo.sh”, this plugin will add the following CVS Header before current cursor.

##############################################################
#  Copyright MyCompany Inc.  All Rights reserved
##############################################################
#
#  File                :  Demo.sh
#  Creator           :  AyuanX ( ayuanx#163!com )
#  Creation Date  :  2008-01-11
#  Description     :  This is my file description.
#
##############################################################
#    $Author$
#    $Source$
#    $Revision$
#    $Date$
#    $Id$
##############################################################
#    $Log$
##############################################################

TIP:
Company Name and Creator are customizable, File Name and Date are auto generated.

WARNING:
This script is written with shell comment character ‘#’ by default, you may need some workarounds to manually comment out the added header with other comment character.

Install details
1. Please edit HeaderCVS.vim, customizing the following variables.
let s:company = “MyCompany”
let s:creator = “AyuanX ( ayuanx#163!com )”
2. Put HeaderCVS.vim into path “~/.vim/plugin/”.
3. Type “:HeaderCVS YOUR DESCRIPTION HERE” in VIM to add CVS Header.
(NOTE: You can type spaces between words or omit description.)

Advertisements

About AyuanX

Big Brother is watching you! Yes, you!
This entry was posted in 個人用途 and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s