bfredl / nvim-miniyank

killring-alike plugin for neovim and vim 8 with no default mappings
MIT License
233 stars 15 forks source link

Invalid miniyank.mpack file path on Windows #17

Closed guhetier closed 6 years ago

guhetier commented 6 years ago

When using nvim-miniyank on Windows, the default file path off miniyank.mpack is invalid (/temp/user/miniyank.mpack does not exist).

The issue can be easily solved by using 'let g:miniyank_filename = "C:\foo\miniyank.mpack"', but a working default value on windows would be nice.

bfredl commented 6 years ago

I think we can use stdpath() on windows. E g does stdpath('data') or stdpath('cache') give sensible locations for you?

guhetier commented 6 years ago

stdpath() is probably a good way to go, however I won't be able to test it on windows before Tuesday. I will tell you then.

guhetier commented 6 years ago

I got stdpath('data') -> C:\User\username\AppDataLocal\nvim-data and stdpath('cache') -> C:\User\USERN~1\AppData\Local\Temp\nvim.

Both seems valid path for the miniyank.mpack (I think the second one is more adapted for temporary data).

bfredl commented 6 years ago

@xNephe I added stdpath('cache') fallback, would you mind testing if it now works without g:miniyank_filename override?

guhetier commented 6 years ago

@bfredl I had to create the folder nvim manually in Temp. Ideally, it should be automatically created. Once the folder created, everything seems fine.

bfredl commented 6 years ago

Ideally, it should be automatically created.

Fixed.