Meino Christian Cramer wrote:
Hi,

 The subject says it all :)

Files are _always_ loaded into tabs in Vim 7 with +windows (i.e. in any Vim 7 executable except "tiny" versions); however if 'showtabline' is 0 the tab bar is never shown (but you can still switch tabs), and if it is 1 (the default) the tab bar is displayed only if there are at least two tabs. To _always_ display the tab bar, use ":set showtabline=2".


I want to load a file into a tab when starting vim from the console (termulator under X) with that file given on the commandline.

  Another thing (not included in the subject :O)))
 When starting vim as above but without an argument and loading
 a file into vim with

                :e tab sp <filename>

When I give that command, I get "E172: only one file name allowed".

":tab sp filename.txt", or, when written in full, ":tab split filename.txt", would keep the current tab (even if there is only a [No Name] file in it) and edit filename.txt in a new tab. To replace the current display by that of filename.txt, use ":e filename.txt". To display the tab bar even if there is only one tab, use ":set showtabline=2". Try it just after loading Vim with no filenames on the command-line, you'll see a tab for your current [No Name] buffer.


 then, I always get a tab called [No Name] and the second one is the
 tab of the file I want to edit.

 Is there a way to avoid the "No Name" buffer...it make the option
 "showtabline" a little superflous (only my two cents...), because
 there is alway an additional buffer ("No Name") even when loading
 only one file into a tab...

 Thank you very much in advance for any :h  ! :))

 Keep :hacking!
 mcc


For a single file:

        vim "+set showtabline=2" foo.txt

If your vimrc sets 'showtabline' to 2 you can even use just "vim foo.txt".

For two or more files:

        vim -p foo.txt bar.txt


Best regards,
Tony.

Reply via email to