Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an ugly hack I came up with to layout my windows how I like them. I have NERDTree and Taglist in a horizontally split window to the left and MiniBufExplorer across the top of the screen. See http://yfrog.com/h7sg7fp

  autocmd VimEnter * call<SID>LayoutWindows()

  function! s:LayoutWindows()
    execute 'NERDTree'
    let nerdtree_buffer = bufnr(t:NERDTreeBufName)
    execute 'wincmd q'
    execute 'Tlist'
    execute 'wincmd h'
    execute 'split'
    execute 'b' . nerdtree_buffer

    let mbe_window = bufwinnr("-MiniBufExplorer-")
    if mbe_window != -1
      execute mbe_window . "wincmd w"
      execute 'wincmd K'
    endif

    execute 'resize +20'
    execute 'wincmd l'
  endfunction


That does it! I've read about both these extensions before, but tomorrow morning I'm taking the time to set them up on my machines. The setup looks like exactly what I've been wanting. Split windows only go so far, and still doesn't let me easily have more than a few buffers visible at once.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: