0

I'm using Neovim v0.2.2 on Windows and I'm finding that editing files using paths with the tilde key (~) doesn't work as I'm expecting, for example if I enter the following command:

:e ~\AppData\Local\nvim\init.vim

Neovim will edit the following file

c:\AppData\Local\nvim\init.vim

Is this a bug or is this not meant to work on Windows? I'm not using any form of terminal emulation, I'm just running nvim-qt.exe directly.

  • FWIW, I don't seem to have this program running NVIM v0.2.3-513-g6762c20af. – Greg Wojan Jan 29 '18 at 20:27
  • 1
    What, if anything, do you get with :echo $HOME? – muru Jan 30 '18 at 4:53
  • @muru I get "c:\" – Justin Jan 30 '18 at 9:27
  • Okay, that explains it - a rouge HOME environment variable set to "c:\" - getting rid of that fixed it – Justin Jan 30 '18 at 9:29
  • @Justin you can post that as an answer then. – muru Jan 30 '18 at 9:30
1

Running :echo $HOME (suggested by muru) returned c:\, which showed that the problem was a rogue HOME environment variable. Deleting this variable fixed the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.