Tony Mechelynck
unread,Jan 23, 2016, 6:44:55 PM1/23/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim_mac
I assume that by “window” you mean “Vim instance”, since in Vim parlance there may be one or more (plit) windows within a tab but not the opposite. There are also one or more tabs (or tab pages) in one “Vim screen” (or Vim instance) but not the opposite.
I don't run a Mac, but in general to start Vim with three tab pages, one file in each, you would invoke it as
vim -p file1.ext file2.ext file3.ext
This should work with any "vim flavour" such as vim, gvim, MacVim, etc. You may want to vary it according to the peculiarities of MacOsX.
See ":help -p"
To open the file at a specific line, I expect that prefixing the filename with +123 (for line 123), followed by a space, should work, but I haven't yet tested it: so to open several files, each in its tab, and each at a specific line, you could do
vim -p +123 file1.ext +456 file2.txt +789 file3.txt
but I haven't tested it.
See ":help +cmd"
In general, if you set the 'viminfo' option correctly, Vim will remember where the cursor was in a given file when it was last used, and with the proper autocommand (as in $VIMRUNTIME/vimrc.example.vim lines 73-79, so if you source that from your vimrc you've got it) the file will be reopened at that same position (or at line 1 if no position was remembered for the file).
Best regards,
Tony.