NyaoVim
NyaoVim copied to clipboard
I cannot open a file directly from command line using NyaoVim
When I type nyaovim file.txt into PowerShell, NyaoVim starts in AppData/Roaming/npm/node_modules/nyaovim instead of editing file.txt.
Your Environment
- OS: Windows
- NyaoVim version: 0.2.0
nvimversion: 0.3.0- Keyboard layout: US English
I am having the same issue. This causes problems with Startify as well, as instead of loading Startify (like I had set up in my init.vim), it loads the netrw directory.
I've done a little digging and comparing nvim to nyaovim, it appears that nyaovim is adding its base directory to argv, you can get around this by editing your init.vim (or vimrc) to drop that file.
Currently, the file you wanted to open IS open, just in a hidden buffer behind the directory that nyaovim has added. I made a little hack that does the trick for me (opens Startify when no options are passed, opens files passed otherwise), this is in near the end of my init.vim
" workaround for nyaovim's weird argv issue
if exists('g:nyaovim_version')
" delete first arg
execute '1argd'
" close current buffer
execute 'bd'
endif