Created
March 17, 2017 06:24
-
-
Save l04m33/f7fef348143785c2bb6e119b212a4bc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! SpawnBufferWindow(name) | |
let dummy_buf = bufnr(a:name, v:true) | |
call setbufvar(dummy_buf, '&buftype', 'nofile') | |
call setbufvar(dummy_buf, '&bufhidden', 'hide') | |
call setbufvar(dummy_buf, '&swapfile', 0) | |
call setbufvar(dummy_buf, '&buflisted', 1) | |
execute 'belowright vertical split #' . dummy_buf | |
endfunction | |
split dummy_preview | |
resize 2 | |
set winfixheight | |
set winfixwidth | |
wincmd j | |
call SpawnBufferWindow('dummy_buf') | |
wincmd h | |
call SpawnBufferWindow('dummy_buf_2') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment