diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
commit | 446beb48d9795843c94860d7f62bdc7374aae1dd (patch) | |
tree | 20e64deaab382991a99d6d963e3ae22f13dba2d9 /runtime/ftplugin/changelog.vim | |
parent | 1c2b2c12bb6883c2fbae239b99c8113ec546a855 (diff) | |
download | vim-git-446beb48d9795843c94860d7f62bdc7374aae1dd.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin/changelog.vim')
-rw-r--r-- | runtime/ftplugin/changelog.vim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index c871a777e..dafcbe20f 100644 --- a/runtime/ftplugin/changelog.vim +++ b/runtime/ftplugin/changelog.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: generic Changelog file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2010-08-17 +" Latest Revision: 2011-05-02 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -99,8 +99,9 @@ if &filetype == 'changelog' function! s:try_reading_file(path) try return readfile(a:path) + catch + return [] endtry - return [] endfunction function! s:passwd_field(line, field) @@ -170,7 +171,7 @@ if &filetype == 'changelog' endfunction " Internal function to create a new entry in the ChangeLog. - function! s:new_changelog_entry(...) + function! s:new_changelog_entry() " Deal with 'paste' option. let save_paste = &paste let &paste = 1 @@ -178,7 +179,7 @@ if &filetype == 'changelog' " Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, - \ g:changelog_username) + \ s:username()) if search(search) > 0 " Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) @@ -197,7 +198,7 @@ if &filetype == 'changelog' " No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, - \ date, g:changelog_username) + \ date, s:username()) " Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' |