sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

gnuchangelog : Changelog support like Emacs/GNU

 script karma  Rating 11/5, Downloaded by 1348    Comments, bugs, improvements  Vim wiki

created by
Luis Caamano
 
script type
utility
 
description
Enhances the default changelog support with a global mapping that opens and adds an entry in the appropriate ChangeLog file.  The entry now includes the edited filename and if configured, the class/method/function name.  The function that finds the class/method/function name can be configured with filetype plugins so that one can use different tag searchers for different languages.

The ChangeLog file is only edited if it already exists, which  is searched upwards starting in the directory where the  edited file is located.  If the corresponding ChangeLog file is already opened, the script either splits the window to edit the buffer or switches to the window where the buffer is already opened.

This behavior is identical to how emacs handles ChangeLog  files with the change-log-mode provided by C-x 4 a.

See also:

http://gnudist.gnu.org/software/emacs/manual/html_node/Change-Log.html
http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html
 
install details
To install and use this plugin:

- Set the EMAIL environment to your email address, e.g.,  export EMAIL="John Doe <jdoe@foo.com>".  This is the user name  that will be included in the changelog entry.

- Copy plugin/gnuchlog.vim to your ~/.vim/plugin dir.

- Copy ftplugin/changelog.vim to your ~/.vim/ftplugin dir.  This overrides the changelog.vim included by default in vim.

- Make sure you have "filetype plugin on" in your .vimrc

If you want to auto-include class/method/function name in the ChangeLog entry using the pythonhelper.py plugin:

- If you don't have it already, copy plugin/pythonhelper.vim to your ~/.vim/plugin dir, which will give you this info in the status line all by itself.

- Copy the ftplugin/python_gnuchlog.vim script to your ~/.vim/ftplugin dir to make the gnuchlog.vim plugin use the pythonhelper.vim info to get the class/method/name when invoked from a python source.  This is an additional python filetype plugin (i.e., loaded and run in addition to the standard python.vim filetype plugin) that configures a global variable that allows the gnuchlog.vim plugin to use information provided by the pythonhelper.vim plugin.

- You can override the statusline setting to your liking by adding a 'set stl' command to ~/.vim/after/plugin/pythonhelper.vim.  See ':help statusline' for info on how to configure the status line.
   For example:

   set stl=%-f%r\ %2*%m%*%h%w\ %1*%{TagInStatusLine()}%*%=%l,%c%V
 

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
gnuchlog_1.3.tgz 1.3 2006-08-22 7.0 Luis Caamano Build the path name of the edited file in the entry title relative to the directory where the ChangeLog file is, an emacs ChangeLog behavior I missed.  Thanks to Donald Curtis <donald-curtis@uiowa.edu> for catching that and providing a patch.
gnuchlog_1.2.tgz 1.2 2006-08-11 7.0 Luis Caamano Added ';' to findfile() call to make sure we always search upwards.  There are some cases where findfile() doesn't find the ChangeLog file if the semicolon is not added to the path to search.
ip used for rating: 54.224.197.86

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo