From 5c06a28fca8be2ccb18afa6feee2543a1657dc40 Mon Sep 17 00:00:00 2001 From: gmarik Date: Thu, 18 Aug 2011 16:30:32 -0500 Subject: [PATCH] couple logging fixes - log is global array so log can be viewed any time - log gets written to a defined location ~/.vim-vundle/vundle.log - TODO: write log changes as they happen --- autoload/vundle.vim | 1 + autoload/vundle/installer.vim | 1 - autoload/vundle/scripts.vim | 9 ++++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 68be06d..d5c5e6a 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -40,5 +40,6 @@ endif func! vundle#rc(...) abort let g:bundle_dir = len(a:000) > 0 ? expand(a:1) : expand('$HOME/.vim/bundle') + let g:vundle_log = [] call vundle#config#init() endf diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index a3eec95..5a35005 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -201,7 +201,6 @@ func! s:system(cmd) abort endf func! s:log(str) abort - if !exists('g:vundle_log') | let g:vundle_log = [] | endif call add(g:vundle_log, a:str) return a:str endf diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 1494dc6..58797f0 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -48,9 +48,12 @@ func! vundle#scripts#setup_view() abort endf func! s:view_log() - if !exists('b:log_file') | let b:log_file = tempname() | endif - call writefile(g:vundle_log, b:log_file) - silent pedit `=b:log_file` + if !exists('g:vundle_log_file') + let g:vundle_log_file = expand('$HOME/.vim-vundle/vundle.log') + endif + + call writefile(g:vundle_log, g:vundle_log_file) + silent pedit `=g:vundle_log_file` wincmd P | wincmd H endf