How can you open multiple files when you're already browsing one?
If I do:
:e myFile
then myFile open in another buffer, but obviously:
:e myFile1 myFile2
open a new file named "myFile1 myFile2"...
It's easily possible to open from outside, be it in tabs or buffer, but from inside, still did not find...
Ctrl-W w to switch between open windows, and Ctrl-W h (or j or k or l ) to navigate through open windows. Ctrl-W c to close the current window, and Ctrl-W o to close all windows except the current one. Starting vim with a -o or -O flag opens each file in its own split.
Open multiple files and easily switch between them To switch from one tab to other, you can use the :bn and :bp commands while the editor is in the command mode. That's it.
:e
and its relatives only accept one argument. See :help :args
:
:argadd myFile1 myFile2
or:
:next myFile1 myFile2
You can use wildcards too:
:argadd *.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With