Created
February 4, 2011 10:10
-
-
Save littlefolk/810951 to your computer and use it in GitHub Desktop.
insert position start at topline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:changelog_new_entry_format = "\n\t* %c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- changelog.vim.orig 2010-11-06 11:55:29.000000000 +0900 | |
+++ changelog.vim 2011-02-04 22:25:34.237915900 +0900 | |
@@ -181,14 +181,13 @@ | |
\ g:changelog_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) | |
if search(g:changelog_date_end_entry_search, 'W') > 0 | |
let p = (line('.') == line('$')) ? line('.') : line('.') - 1 | |
else | |
let p = line('.') | |
endif | |
let ls = split(s:substitute_items(g:changelog_new_entry_format, '', ''), | |
- \ '\n') | |
+ \ '\n', 1) | |
call append(p, ls) | |
call cursor(p + 1, 1) | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment