Hacker News new | ask | show | jobs
by IgorPartola 4816 days ago
I have mapped the Tab key to move between split windows. I also mapped Ctrl+T to open a new tab, and CTRL-H and CTRL-L to move to the left/right tab respectively. It works well and seem pretty natural. I suppose if I had a giant monitor I could use more splits, but realistically more than two of them feels very cramped. My .vimrc is here: https://raw.github.com/ipartola/ipartola-bash-and-vim/master...

The relevant parts are:

  " shortcuts
  map <Tab> <C-W><C-W>
  
  " Tabs
  map <C-t> <Esc>:tabnew<CR>
  map <C-l> :tabnext<CR>
  map <C-h> :tabprevious<CR>
2 comments

Splits came to vim way before tabs did as a result I use splits as vertical pseudo tabs:

    nnoremap <c-j> <c-w>j<c-w>_
    nnoremap <c-k> <c-w>k<c-w>_
Which does both split navigation and split maximizing. I could probably switch to tabs but I'm happy with how things work and I don't really see any advantage over how I'm doing things now.
To switch b/w tabs, I find Ctrl + PageUp/PageDown a lot more convenient, since it's also standard in Browsers/other text editors. :D