3 ms·
Regular vim has tabs and you can bind any key you want to switching them (I use F2/F3). The default is :next and :prev or gt/gT. I’ve been using the feature f
by CoolGuySteve 7y ago
Regular vim has tabs and you can bind any key you want to switching them (I use F2/F3). The default is :next and :prev or gt/gT. I’ve been using the feature for years now.
You can also open a list of files in separate tabs with the -p argument. So “vim -p CppFile.*” will open the .h and .cpp in separate tabs for example. You can then Y/p between the two buffers.
It’s so useful that I always “alias vi=vim -p” in my .profile.
- leggomylibro 7y agoIs the '-p' necessary? I like to open files in windows with e.g. "vim -O file1 file2", and I've noticed that if I accidentally omit the '-o' or '-O', it opens each file in a tab. Or at least, it opens each file in individual pages that you navigate between with ':next' / ':prev'.
- jolmg 7y agoThe -p gives you a tab for every file opened. If you don't provide it, it still opens them and you get a buffer for each one, but it doesn't open any tabs. If you still get tabs even if you don't provide it, maybe you have a vim plugin that's doing that.