Skip to content

Commit

Permalink
Rename g:SingleCompileRun_split, doc clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
mMontu committed Apr 3, 2014
1 parent 1c5bc14 commit 83a63c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions autoload/SingleCompile.vim
Expand Up @@ -527,8 +527,8 @@ function! s:Initialize() "{{{1
let g:SingleCompile_resultsize = 5
endif

if !exists('g:SingleCompileRun_split')
let g:SingleCompileRun_split = 'split'
if !exists('g:SingleCompile_split')
let g:SingleCompile_split = 'split'
endif

if !exists('g:SingleCompile_showquickfixiferror') ||
Expand Down Expand Up @@ -1586,7 +1586,7 @@ function! SingleCompile#ViewResult(async) " view the running result {{{1
" else clear it, but leave it there to be refilled
if l:result_bufnr == -1
exec 'rightbelow '.g:SingleCompile_resultsize.
\g:SingleCompileRun_split.' __SINGLE_COMPILE_RUN_RESULT__'
\g:SingleCompile_split.' __SINGLE_COMPILE_RUN_RESULT__'
setl noswapfile buftype=nofile bufhidden=wipe foldcolumn=0 nobuflisted
else
let l:result_bufwinnr = bufwinnr(l:result_bufnr)
Expand Down
10 changes: 5 additions & 5 deletions doc/SingleCompile.txt
Expand Up @@ -379,16 +379,16 @@ or
<
It is also possible to select between vertical or horizontal split depending
on the current window width. To achieve this it is necessary to update the
option on the mapping that calls |:SCCompileRun|. This can be done in a new
mapping, or replacing the default mapping to |:SCCompileRun|, <F10>:
plugin options on the mapping that calls |:SCCompileRun|. This can be done in
a new mapping, or replacing the default mapping to |:SCCompileRun|, <F10>:
>
nnoremap <F10> :update \| call SingleCompileSplit() \| SCCompileRun<CR>
nnoremap <F10> :call SingleCompileSplit() \| SCCompileRun<CR>
function! SingleCompileSplit()
if winwidth(0) > 160
let g:SingleCompileRun_split = "vsplit"
let g:SingleCompile_split = "vsplit"
let g:SingleCompile_resultsize = winwidth(0)/2
else
let g:SingleCompileRun_split = "split"
let g:SingleCompile_split = "split"
let g:SingleCompile_resultsize = 15
endif
endfunction
Expand Down

0 comments on commit 83a63c8

Please sign in to comment.