Skip to content

Instantly share code, notes, and snippets.

@l04m33
Created March 17, 2017 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l04m33/f7fef348143785c2bb6e119b212a4bc5 to your computer and use it in GitHub Desktop.
Save l04m33/f7fef348143785c2bb6e119b212a4bc5 to your computer and use it in GitHub Desktop.
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