Vim: `:tabnew` in WSL2 enviroment seems not to work.

Created on 29 Sep 2020  路  3Comments  路  Source: VSCodeVim/Vim

Describe the bug
:tabnew in WSL2 environment seems not to work.

To Reproduce
I want to work in WSL2 and experience the Vim in VS Code. But when I typed :tabnew and wanted to open a certain file in the current directory, I got this prompt:

vim_bug_report_0
vim_bug_report_1

Wired, but OK, I followed the direction, clicked the button, and created the file:

vim_bug_report_2

But it didn't work as expected. I found the created file in a totally different folder:

vim_bug_report_4

This is what I want:

vim_bug_report_3

Expected behavior
The target file in the current working directory is opened as usual.
Or the missing file is created on the right path.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.17.1
  • VSCode version: v1.49.2
  • OS:

    • Win 10.0.18362 Build 18362

    • WSL2 Ubuntu 20.04.1 LTS

kinbug

Most helpful comment

I assume you didn't install Vim locally on the remote environment.

https://github.com/VSCodeVim/Vim/blob/fec96c4695965a4903e5e68b1af159cec2f1e6be/src/cmd_line/commands/tab.ts#L86-L104
This section of code is not handling cross platform remote path (see https://github.com/microsoft/vscode/issues/105969 for more information about the difficulties of handling cross platform path in remote)

I think the highlighted section of code offers the same functionality as :e maybe we could call the function used by :e, which I implemented some supports for vscode remote a while back at https://github.com/VSCodeVim/Vim/pull/4032/. However, it doesn't support linux remoting into windows env (see https://github.com/VSCodeVim/Vim/issues/5158)

All 3 comments

I assume you didn't install Vim locally on the remote environment.

https://github.com/VSCodeVim/Vim/blob/fec96c4695965a4903e5e68b1af159cec2f1e6be/src/cmd_line/commands/tab.ts#L86-L104
This section of code is not handling cross platform remote path (see https://github.com/microsoft/vscode/issues/105969 for more information about the difficulties of handling cross platform path in remote)

I think the highlighted section of code offers the same functionality as :e maybe we could call the function used by :e, which I implemented some supports for vscode remote a while back at https://github.com/VSCodeVim/Vim/pull/4032/. However, it doesn't support linux remoting into windows env (see https://github.com/VSCodeVim/Vim/issues/5158)

That's AMAZING! Very informative and helpful! Thanks a lot!

I am not sure if we should close this, since this is still a bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

waltiam picture waltiam  路  3Comments

orn688 picture orn688  路  3Comments

elithrar picture elithrar  路  3Comments

edwintorok picture edwintorok  路  3Comments

st-schneider picture st-schneider  路  3Comments