Skip to main content
added 553 characters in body
Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argdo tabnew.

Edit To reduce the number of keypresses you can add the following line in your .vimrc:

autocmd Filetype netrw nmap <buffer> <F5> ma:argdo tabnew<CR>

This is an autocommand which is executed when you open a netrw buffer (FileType netrw) and creates a mapping only in this buffer which will put the marked files in the arglist and issue the command :argdo tabnew.

With that you can simply mark your files with mf and use F5 (or another key if you prefer) to open the files in new tabs.


See

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argdo tabnew

See

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argdo tabnew.

Edit To reduce the number of keypresses you can add the following line in your .vimrc:

autocmd Filetype netrw nmap <buffer> <F5> ma:argdo tabnew<CR>

This is an autocommand which is executed when you open a netrw buffer (FileType netrw) and creates a mapping only in this buffer which will put the marked files in the arglist and issue the command :argdo tabnew.

With that you can simply mark your files with mf and use F5 (or another key if you prefer) to open the files in new tabs.


See

added 1 character in body
Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argoargdo tabnew

See

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argo tabnew

See

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argdo tabnew

See

Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

From :h netrw-t:

BROWSING WITH A NEW TAB             netrw-t

Normally one enters a file or directory using the <cr>.  The "t" map
allows one to open a new window holding the new directory listing or file in
a new tab.

So in the netrw window simply press t when your cursor is on the file or on the directory you want to open in the new tab.


To do that with multiple files you need to mark them, put them in the arglist and then use the arg list to open the tabs.

To mark a file in a netrw window use mf.

Once the files are marked put them in the arglist with ma.

Then simply use :argo tabnew

See