Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:o fails in remote SSH #3815

Closed
ashgillman opened this issue Jun 6, 2019 · 4 comments · Fixed by #4032
Closed

:o fails in remote SSH #3815

ashgillman opened this issue Jun 6, 2019 · 4 comments · Fixed by #4032

Comments

@ashgillman
Copy link

Describe the bug
When I connect to a remote SSH host using Remote-SSH, using :o and then hitting tab for autocomplete results in:

TaskQueue: Error running task. Failed to handle key=<tab>. ENOENT: no such file or directory, scandir '\path\goes\here'.

To Reproduce
Steps to reproduce the behavior:

  1. Connect to remote host with Remote-SSH
  2. Open a file
  3. :o ./
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.8.1
  • VSCode version: 1.35.0-insider
  • Host OS: Windows 10
  • Remote OS: Ubuntu 18.04

Additional context
Note that the SSH remote is Ubuntu, could be a contributing issue.

@stevenguh
Copy link
Contributor

Tab completion for :e error out the same way with remote ssh session as well

@stevenguh
Copy link
Contributor

#3639
FYI, this was the pull request for the feature in the first place

@stevenguh
Copy link
Contributor

stevenguh commented Jun 27, 2019

I looked more into this, and I think this is because the Vim extension is running on the local machine which doesn't have the access of the remote file system and failed at https://github.com/VSCodeVim/Vim/blob/master/src/actions/commands/actions.ts#L1979

EDIT: Maybe using vscode api instead of directly using fs would work?
https://code.visualstudio.com/api/references/vscode-api#workspace.findFiles

EDIT 2: I don't think that findFiles API would work for remote, and there seems to be a proposed API to access file system with any scheme.
https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.proposed.d.ts#L1493

@stevenguh
Copy link
Contributor

stevenguh commented Jul 12, 2019

I just tested the proposed API. It works for any file connecting scheme like remote ssh.
microsoft/vscode#48034
However, I found the the current codebase for file completion is actually in a bad shape, since it doesn't even work with windows local file completion.

stevenguh added a commit to stevenguh/Vim that referenced this issue Aug 27, 2019
stevenguh added a commit to stevenguh/Vim that referenced this issue Aug 27, 2019
stevenguh added a commit to stevenguh/Vim that referenced this issue Aug 30, 2019
stevenguh added a commit to stevenguh/Vim that referenced this issue Aug 31, 2019
stevenguh added a commit to stevenguh/Vim that referenced this issue Aug 31, 2019
stevenguh added a commit to stevenguh/Vim that referenced this issue Sep 2, 2019
This commit refactors the existing auto complete mechanism to be more consistent with the actual Vim while adding support for VS Code Remote.

Fixes VSCodeVim#3815
stevenguh added a commit to stevenguh/Vim that referenced this issue Sep 2, 2019
This commit refactors the existing auto complete mechanism to be more consistent with the actual Vim while adding support for VS Code Remote.

Fixes VSCodeVim#3815
stevenguh added a commit to stevenguh/Vim that referenced this issue Sep 2, 2019
This commit refactors the existing auto complete mechanism to be more consistent with the actual Vim while adding support for VS Code Remote.

Fixes VSCodeVim#3815
jpoon pushed a commit that referenced this issue Sep 16, 2019
* Only untidify when it is a local fs

* Trim the command before running

This is to allow command with extra spaces in front and back to run

* Fix existing auto completion test

* Add remote file completion

This commit refactors the existing auto complete mechanism to be more consistent with the actual Vim while adding support for VS Code Remote.

Fixes #3815

* Add more tests to increase tab-completion coverage

* Use untitled document for nonexisting file path in cmd

In the actual Vim, commands like ":e" do not create a file first if the path in the cmd doesn't exist. Rather, it creates an empty buffer and only create the file on write.
This commits changes the behavior to be more consistent with actual Vim by using untitled document instead creating the file if the file on the cmd is not found.

* Update according to the comments

* Revert CommandGoToDefinition to master

* Remove the addition line breaks added

* Refactor and address comments

* Call <Esc> to clean up test

* Exceute <Esc> cleanup in finally

* Revert "Exceute <Esc> cleanup in finally"

This reverts commit aeb70ae.

* replace afterEach with teardown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants