Vim icon indicating copy to clipboard operation
Vim copied to clipboard

read command does not work

Open bbtdev opened this issue 7 years ago • 4 comments

Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug report I've read this feature should work

What happened: Trying to read a file I get: Vim:Error:ENOENT: no such file or directory. Tried a file from the same dir as the one opened, tried one from the main folder, different combinations still no success.

What did you expect to happen: Like in vim, :read filename

How to reproduce it (as minimally and precisely as possible): ":", "read filename"

Environment:

  • Extension (VsCodeVim) version: 0.10.13
  • VSCode version: 1.19.3
  • OS version: Ubuntu 16.04

bbtdev avatar Jan 29 '18 17:01 bbtdev

This is probably pretty annoying, but I'm not actually sure which directory it's based off of the top of my head. However, if you try using an absolute path it should work.

Basically, the real issue is that we don't expect tildes unless it's with neovim, and that the relative directory is really arbitrary.

Chillee avatar Jan 31 '18 05:01 Chillee

The file pathing is based off of VSCode's workspace (ie. where you opened Code from). For instance, if you opened code from /my/dir, your :read command should be a path relative to /my/dir or pass an absolute path.

An improved behaviour could be to have :read open files relative to the currently opened file.

jpoon avatar Feb 04 '18 11:02 jpoon

The especially confusing thing here is that it autocompletes (when you hit tab) based off your current working directory just fine, but as soon as you hit return you get the ENOENT.

yankcrime avatar Aug 20 '19 11:08 yankcrime

Still an issue in 2024 :disappointed:

porjo avatar Mar 13 '24 09:03 porjo