atom-rst-preview icon indicating copy to clipboard operation
atom-rst-preview copied to clipboard

Preview is not triggered by a shortcut or from the menu

Open kparal opened this issue 9 years ago • 8 comments

If I hit Ctrl+Shift+R on a .rst document, nothing happens. If I press Ctrl+Shift+P, search for "rst" and hit Enter on "Rst Preview: Toggle" menu item, nothing happens. But if I right click on the file name in the filesystem tree (it really has to be on the file name, not just anywhere on the line), there's "ReStructuredText Preview" menu item as the first one in the list, and that one works - a preview is displayed.

I wonder why that is? No errors in the terminal.

rst-preview 1.3.0 atom-0.199.0-0.1.fc21.x86_64

kparal avatar May 29 '15 07:05 kparal

I encountered the same problem with the following versions:

rst-preview-1.3.0 atom-1.0.1

ramereth avatar Aug 08 '15 23:08 ramereth

Do you have any conflicting shortcuts?

lsegal avatar Aug 08 '15 23:08 lsegal

Hmm, I did but I disabled that package. It was the "Symbols View" that had a conflicting key binding. Still having the problem though :(

ramereth avatar Aug 08 '15 23:08 ramereth

I would suggest restarting. If there was a conflicting shortcut that would definitely explain the issue.

lsegal avatar Aug 08 '15 23:08 lsegal

I did that already, and I don't see the other keybinding but its still not working.

ramereth avatar Aug 08 '15 23:08 ramereth

I was encountering the same issue on my system (Ubuntu 14.04, rst-preview 1.3.0, language-restructuredtext 0.7.0).

In my case, I found that the language-restructuredtext plugin was modifying the grammar to gfm.restructuredtext, for files with a .rst extension. The shortcut was working, but nothing was displayed, as the default settings for rst-preview ignore this grammar.

This was fixed by modifying the grammars that rst-preview detects. In Preferences -> Packages -> rst-preview -> Settings, set the Grammars to source.rst, text.plain, text.plain.null-grammar, text.restructuredtext, gfm.restructuredtext (which is the defaults plus gfm.restructuredtext). Then the rst-preview package shortcut will work correctly.

This could be modified in the default grammars for rst-preview (set in rst-preview.coffee), if that's the preference. language-restructuredtext appears to be the most used plugin for reStructuredText syntax highlighting, so this would likely improve usability. Thoughts?

dayeti avatar Aug 13 '15 03:08 dayeti

Confirmed the workaround @dayeti suggested works for me.

ramereth avatar Aug 14 '15 03:08 ramereth

I made the change @dayeti suggested but still no preview unless I do the right-click-in-file-list workaround. I'm using rst-preview 1.3.1 and language-restructuredtext 0.13.0. No conflicts in keybindings. It just doesn't work. rst-preview-pandoc does though. https://atom.io/packages/rst-preview-pandoc So I'm using that instead, but it was more of a hassle to install.

barbara-sfx avatar Apr 13 '16 01:04 barbara-sfx