0
我正在嘗試進行一個綁定,<Leader>t
,以切換特定分割進出自己的選項卡。這兩個命令是詢問vim在當前選項卡中有多少分割
" Open current split in a new tab
map <Leader>T <C-w>T
" Close current buffer (and thus the new tab)
map <Leader>t <C-w>c
我該如何合併它們?像
map <Leader>t numberOfSplitsInCurrentTab > 1 ? <C-w>T : <C-w>c
我認爲這是一個很好的方法。另外,如果你有關於vim的另一個問題,你可能有興趣將它發佈在[vi.stackexchange](http://vi.stackexchange.com/)上,它專用於vi和vim主題;) – statox
哈哈謝謝...將有。肯定會有的。 –