Vim, reopen last closed window, that was in split

后端 未结 5 1596
清酒与你
清酒与你 2020-12-25 09:58

Is it possible to reopen closed window in vim, that was in split?

Something like ctrl+shift+t with browser tabs?

5条回答
  •  爱一瞬间的悲伤
    2020-12-25 10:20

    I've gotten this to work by using bufmru.vim!

    The following command, :ReopenLastTab, will re-split the last-open buffer:

    command ReopenLastTab execute "vsplit" bufname(g:bufmru_bnrs[1])
    

    I installed bufmru using Vundle, as below, but of course you can install it any way you like.

    #.vimrc
    
    " Install bufmru with Vundle
    Plugin 'vim-scripts/bufmru.vim'
    
    let g:bufmru_switchkey = ""  " I never use this: the default is Space, but I don't need to use it so set it to something I don't care about.
    

提交回复
热议问题