How I can make a window automatically visible on all tabs ? Like NerdTree-tabs plugin: :tabsAba 1    NERD_tree_1    main.cAba 2    NERD_tree_1    MakefileAba 3    NERD_tree_1>   readme.md
How to make a window visible on all tabs
vimrc;vim windows
First, @romainl's comment is a really good advice: you'll learn a lot by reading a real plugin code and trying to understand its behavior.Now if you're new to vimscript and coding, it can be pretty hard. So here is a solution. (It is probably more simple and maybe not as efficient as NERDTree way to do it but it should work properly)Add this to your .vimrc:let g:windowToKeep=[]nnoremap <F2> :call SetWindowToKeep()<CR>nnoremap <F4> :call OpenTab()<CR>function! SetWindowToKeep()    let g:windowToKeep = [expand(%:p), winheight(0), winwidth(0)]endfunctionfunction! OpenTab()    execute tabedit  . g:windowToKeep[0]    execute vsplit    execute resize  . g:windowToKeep[1]    execute vertical resize  . g:windowToKeep[2]endfunctionThe idea behind this code is that make a window visible on all tabs is actually doing the following:Selecting a windows containing a buffer as the one you want to keepThen each time a new tab is created, it is splited to contain:The selected window with the same buffer and the same sizeAnother window containing a new bufferTo do so, this code will create a variable g:windowToKeep which will contain the window that you want to keep.To set this variable a mapping is done on F2: you'll have to press this key to set the window to keep on your tabs.Then you can call the function OpenTab() either with ex mode or by pressing F4. This function creates a new tab with a buffer you want to keep, split the tab and resize the window containing your buffer.Note 1 You can (of course) replace <F2> and <F4> by your favorite mappings.Note 2 It is possible that the function isn't exactly what you expected because your workflow can be a little different than what I imagined while creating the code. As it's a pretty simple code you should be able to tweak it to fit your needs more closely. 