tiler.vim
tiler.vim copied to clipboard
Automaticall call TilerReorder after NerdTree closes
Hey ...
do you have any solution to call TilerReorder after I close NerdTree (calling it through toggle).
After it's closed the layout is incorrect and needs to be reordered, I'd love that to happen automatically?
Thanks for the cool plugin, I tries DWM.vim but it was to rough ...
You could just create a new command, that calls both NERDTreeToggle
and TilerReorder
I also noticed that if I create a new window with nerdtree open, the order of windows gets mixed up and nerdtree gets pushed to the main panels and my previous window gets put in the nerdtree position. Really frustrating :(
@zhamlin Think this is a config issue? The new window was opened with:
nnoremap <C-\> :term<CR><C-w>N:call tiler#reorder()<cr>i
" Tiler
tmap <C-q> <C-w>N
nnoremap + <C-w>3+
nnoremap _ <C-w>3-
nnoremap <C-\> :term<CR><C-w>N:call tiler#reorder()<cr>i
map <C-@> <plug>TilerNew
let g:tiler#master#size = 20
let g:tiler#master#count = 1
let g:tiler#layout = 'bottom'
let g:tiler#popup#windows = {
\ 'fzf': { 'position': 'bottom', 'size': 10, 'filetype': 'fzf', 'order': 3 },
\ 'nerdtree': { 'position': 'left', 'size': 10, 'filetype': 'nerdtree', 'order': 2 },
\ 'tagbar': { 'position': 'right', 'size': 10, 'filetype': 'tagbar', 'order': 1 },
\ }
What order are you creating the windows in so I can try to reproduce? I started with a terminal window, opened up nerd tree, and it went to the correct location.
Your config looks fine to me. Does calling tiler#reorder()
after NerdTree is in the wrong spot do anything?
After some investigation it appears to not be configuration based, I think you just aren't accounting for terminal buffers or something of that nature.
Open vim, run :NERDTreeToggle
, then move focus back to your main buffer. Then run :term
, and you should get a terminal in a new window, horizontally split. Then hit <C-w>N
to exit terminal mode, then :call tiler#reorder()
, to reorder the windows. Then you end up in the weird state I mentioned.
Let me know if you can't reproduce or need more info!
@zhamlin
I can reproduce it, but at the moment don't have anytime to look into it. If you decide to try and fix it and need any help feel free to ask.