From 3657056cc302efd98056fd2349776781759b1229 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 28 Jan 2008 09:29:22 +0100 Subject: * tools/vim: - added APBTeam vim setup and tools. --- tools/vim/plugin/utils.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/vim/plugin/utils.vim (limited to 'tools/vim/plugin/utils.vim') diff --git a/tools/vim/plugin/utils.vim b/tools/vim/plugin/utils.vim new file mode 100644 index 00000000..be99551b --- /dev/null +++ b/tools/vim/plugin/utils.vim @@ -0,0 +1,25 @@ +" Name: ni-utils +" Author: Nicolas Schodet +" Last Update: 2008-01-28 +" Description: Misc utils. +" License: Public domain. +" Installation: Put it in &runtimepath/plugin. + +if exists('g:ni_utils_plugin') | finish | endif +let g:ni_utils_plugin = 1 + +" Look up README file in '.' and '..' to find a program description. +function! GetReadme() + if filereadable ('README') + let readme = 'README' + elseif filereadable ('../README') + let readme = '../README' + endif + if exists ('readme') + let progname = substitute (system ('head -1 ' . readme), "\n", '', '') + else + let progname = '' + endif + return progname +endfunction + -- cgit v1.2.3