InstantRst
InstantRst copied to clipboard
Running :InstantRst gives the error that it can't open a .tmp file
When I run the :InstantRst command from a RST file I get the following error messages:
Sorry for it being in dutch, but it means:
- Error occured while processing function startdaemon
- Opening file Appdata\Local\xxxxx.tmp has failed
- Error occured while processing function refreshview
- Opening file xxxxx.tmp has failed
Could you help me to make this work?
I need to make a tmp file in your tmp directory, can you open that directory?
Yea the directory is available but It still gives the same error message.
It looks like it tries to open the tempfile with the wrong name. Because I see a tempfile being created, but in the error messages it says it looks for a different file.
For example: This file gets created: VI0001.tmp And the error says the following: Could not open file VI201250.tmp
...
Do you have any idea why this is happening? I would like to use this plugin because it looks awesome if it works.
https://github.com/gu-fan/InstantRst/blob/96f37682deadd093953a1d424000434461042756/after/ftplugin/rst/instantRst.vim#L123
you can check with :echo tempname()
if it return a right filename
Yea it does:
I've even put echos in the instantRst.vim file to see what the filename is that it wants to process, and it is the same filename as that is made on disk, but when it executes the command. It still gives a different name.
well...
Were you able to find a reason for this ?
https://github.com/gu-fan/InstantRst/blob/96f37682deadd093953a1d424000434461042756/after/ftplugin/rst/instantRst.vim#L126
No, you can try yourself, check if it's the right name when writing file
add echo b:ir_tmpfile
before that line
Run into the same, and https://github.com/gu-fan/InstantRst/pull/22 fixes it.
Besides, since instant-rst is in Python3, had to use pip3 install https://github.com/Rykka/instant-rst.py/archive/master.zip
as I have both pip (python2) and pip3 (python3) in my system.