3 ms·
You can use :tabe to open a new tab, and then `gt` and `gT` to switch tabs. This is somehow controversial to some[1] but it never bothered me. As far as file
by woogley 12y ago
You can use :tabe to open a new tab, and then `gt` and `gT` to switch tabs.
This is somehow controversial to some[1] but it never bothered me.
As far as file navigation though, I just use crtlp[2]
[1]: https://stackoverflow.com/a/103590 https://stackoverflow.com/a/103590
[2]: https://github.com/kien/ctrlp.vim https://github.com/kien/ctrlp.vim
- wampus 12y agoAdd this[1] to .vimrc for easy navigation between multiple files in each tab: map <C-J> <C-W>j<C-W>_ map <C-K> <C-W>k<C-W>_ set wmh=0 Load a new file with the split command: :sp <file> and use Ctrl+j or Ctrl+k to switch between the splits. It's a handy way to organize and edit multiple files. [1] http://vim.wikia.com/wiki/Switch_between_Vim_window_splits_easily http://vim.wikia.com/wiki/Switch_between_Vim_window_splits_e...
- Anthony-G 12y agoI read that StackOverflow answer before and given the amount of upvotes it received, I presumed that it had something going for it. I was already regularly comfortably using `Ctrl-^` to switch back and forth between the current and alternate buffers but I was also used to having different buffers open in different tabs and selecting them using either the `gt` family of commands or the `:tabfirst` family. I like having the tab-bar provide visual cues for each of the buffers that I’m working with rather than having to type `:ls` to see the list of buffers (which can sometimes be very large as I often leave Vim running for a long time and if I do close, I usually restore it from a session). Like you, I’ve yet to encounter any problems with this way of working. It’s possibly because I’ve never used any commands which utilise the quickfix buffer (`:make`, `:grep`, and `:helpgrep`) but maybe, there’s something else I’m missing?