gu-fan / InstantRst

instant rst preview in browser
106 stars 16 forks source link

Setting g:instant_rst_static Does not Work #18

Open nemo-nullius opened 6 years ago

nemo-nullius commented 6 years ago

Hi! I have been using InstantRst for some time, and find this plugin really wonderful.

However, there is a small issue with the option g:instant_rst_static - it does not seem to work. I want to change the style sheet from mars.css to rhythm.rss, and add this line let g:instant_rst_static = '/path/to/instant_rst/static/rhythm.css' in ~/.vimrc, but the preview of the rst file in firefox does not seem to change at all.

Then I try to modify /instant_rst/templates/index.html, changing the line <link rel="stylesheet" href="/static/mars.css"> to <link rel="stylesheet" href="/static/rhythm.css"> and this time it works. So I just wonder what the real function of g:instant_rst_static is. (It sets the -t argument of instant-rst.py in Rykka/InstantRst actually. So Is it just an option to indicate the directory of static files rather than to refer to a css file directly? And if I want to change the style sheet, I have no other options but to modify the related line in index.html as above?)

By the way, I also happen to find that rhythm.css in Rykka/InstantRst is a little different from the one in Rykka/rhythm. I prefer the latter one for it has wider line spacing, which makes the rendering of rst much more beautiful. (The former one would sometimes make the lines overlap with each other.)

Thanks again for your great work!

gu-fan commented 6 years ago

that's right... g:instant_rst_static is that https://github.com/gu-fan/InstantRst/blob/96f37682deadd093953a1d424000434461042756/after/ftplugin/rst/instantRst.vim#L87

the theme haven't update for a long time, let me check it