Thursday, February 24, 2011

Re: How to open files in splitted tabs

From my .vim config
...
"" Tabs

nmap <M-t> :sp<cr><C-w>T " Open current buffer in new tab
nmap <M-w> :tabclose<cr>
map <C-Left> <esc>:tabprevious<cr>
map <C-Right> <esc>:tabnext<cr>

" Open tab by number
map <M-1> 1gt
map <M-2> 2gt
map <M-3> 3gt
map <M-4> 4gt
map <M-5> 5gt
map <M-6> 6gt
map <M-7> 7gt
map <M-8> 8gt
map <M-9> 9gt
...

"M" is an Alt key
"C" is Control

So:
Alt+T to open current buffer in new tab
Alt+W to close the tab
Ctrl+Left to previous tab
Ctrl+Right to next tab
Alt+[1..9] to switch tab by number


---
http://github.com/vrybas/dotvim

On Sat, Feb 19, 2011 at 2:11 AM, Tim Chase <vim@tim.thechases.com> wrote:
> On 02/18/2011 01:02 PM, Tianshuo Deng wrote:
>>
>> There are 3 files in buffers, How can I display each of them
>> in each tab? I noticed there is a "sball" command, which will
>> display each of files in each window. Is there a similiar
>> command for tabs??
>
> As mentioned at
>
>  :help :sball
>
> just prefix it with "tab":
>
>  :tab sball
>
> -tim
>
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: