From d1c36f1abaafa5fd54302b7dd1d6c4effcb4d3be Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sun, 7 Aug 2016 03:39:32 -0400 Subject: [PATCH] Vim: jump to top of build output log --- vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 72aca40..74cdd0b 100644 --- a/vimrc +++ b/vimrc @@ -161,7 +161,7 @@ function! RunBuildScript() let l:current_buf = bufnr("%") " Save current buffer in case there are unsaved changes - write + silent! wall if l:existing_buf > 0 silent! exe l:existing_buf . " wincmd w" @@ -178,6 +178,7 @@ function! RunBuildScript() " Output compile log into buffer let l:output = system("./build") call append(0, split(l:output, '\v\n')) + go silent! exe l:existing_buf. " wincmd w" endfunction