From 7bc2349fbb7eb87e8f78d827b0982220edf2fcaa Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sat, 6 Aug 2016 10:15:45 -0400 Subject: [PATCH] Vim: Silence window restore error in build script --- vimrc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vimrc b/vimrc index 1e76528..8ab6956 100644 --- a/vimrc +++ b/vimrc @@ -164,15 +164,12 @@ function! RunBuildScript() write if l:existing_buf > 0 - exe l:existing_buf . "wincmd w" + silent! exe l:existing_buf . " wincmd w" "execute 'botright sb' l:existing_buf else botright sp __build_output_log__ + setlocal buftype=nofile resize 10 - " NOTE: this would throw an error if running the build in the output - " buffer, even though a check is done here to find an existing buffer - " before making a new one. Strange. - "setlocal buftype=nofile endif " Clear the buffer @@ -182,7 +179,7 @@ function! RunBuildScript() let l:output = system("./build") call append(0, split(l:output, '\v\n')) - exe l:current_buf . "wincmd w" + silent! exe l:existing_buf. " wincmd w" endfunction nnoremap b :call RunBuildScript() @@ -290,6 +287,7 @@ map gb :Gblame """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " SEARCHING """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" TODO: Not sure if I still need this map gs :let @/ = "" " Replace the selected text in all files within the repo