# HG changeset patch # User Ludovic Chabant # Date 1362546065 28800 # Node ID 7afcd4d3706284913bb35e02734905cb216c459a # Parent 1cf08e4a7947fdf8066fee00a662d06e74c37c6a Added vertical `Hglog` commands. diff -r 1cf08e4a7947 -r 7afcd4d37062 plugin/lawrencium.vim --- a/plugin/lawrencium.vim Mon Nov 26 21:07:43 2012 -0800 +++ b/plugin/lawrencium.vim Tue Mar 05 21:01:05 2013 -0800 @@ -1314,7 +1314,7 @@ " Hglog, Hglogthis {{{ -function! s:HgLog(...) abort +function! s:HgLog(vertical, ...) abort " Get the file or directory to get the log from. " (empty string is for the whole repository) let l:repo = s:hg_repo() @@ -1327,7 +1327,11 @@ " Get the Lawrencium path for this `hg log`, " open it in a preview window and jump to it. let l:log_path = l:repo.GetLawrenciumPath(l:path, 'log', '') - execute 'pedit ' . l:log_path + if a:vertical + execute 'vertical pedit ' . l:log_path + else + execute 'pedit ' . l:log_path + endif wincmd P " Add some other nice commands and mappings. @@ -1403,8 +1407,10 @@ return l:rev endfunction -call s:AddMainCommand("Hglogthis :call s:HgLog('%:p')") -call s:AddMainCommand("-nargs=? -complete=customlist,s:ListRepoFiles Hglog :call s:HgLog()") +call s:AddMainCommand("Hglogthis :call s:HgLog(0, '%:p')") +call s:AddMainCommand("Hgvlogthis :call s:HgLog(1, '%:p')") +call s:AddMainCommand("-nargs=? -complete=customlist,s:ListRepoFiles Hglog :call s:HgLog(0, )") +call s:AddMainCommand("-nargs=? -complete=customlist,s:ListRepoFiles Hgvlog :call s:HgLog(1, )") " }}}