-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Preview auto scrolls to same location your cursor is at in the editor #222
Comments
We currently have synchronized scrolling for Markdown (since ReText 6.0), but it's not trivial to implement this for reStructuredText… |
Sorry, but with 6.0.2 on Windows the live preview is not synchronized. |
Yes. Is the WebKit renderer enabled? (Note that the official Qt installers no longer include a WebKit module, so you may need to build it manually…) |
No, it is not enabled. It is grayed out.
What should I do to build it?
Thanks!
Mario
Il 30 Novembre 2016 15:08:32 CET, Dmitry Shachnev <notifications@github.com> ha scritto:
…
@crystalfp
> Is there anything other that I have to check?
Yes. Is the WebKit renderer enabled? (Note that the official Qt
installers no longer include a WebKit module, so you may need to build
it manually…)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#222 (comment)
--
Inviato da Galaxy Notes con K-9 Mail. Perdonate la brevità.
|
I do not use Windows, so I cannot give you the precise instructions. But you can probably follow instructions on this wiki page (and source code from the same repository). Note that in will take a lot of time (> 1 hour), lots of RAM (> 4 GB) and also some disk space (~ 10 GB). We are investigating switching to Qt WebEngine (which is shipped with Qt), but that won't happen soon. |
Sigh, too much work. |
You can try to use the pre-compiled (MSVC 2015) qtwebkit binaries from /~https://github.com/annulen/webkit/releases/tag/qtwebkit-tp4. You will still need to compile the Python bindings yourself (but this is much easier to do). Anyway, ReText is in no way officially supported on Windows, and on popular Linux distros both qtwebkit and its bindings are available from the repositories. |
@mitya57 - Just checking to see where this is at. Is there any chance we're going to see a I'm working with a lot of math blocks. With I'm already comfortable with markdown + math blocks I haven't looked into code, but can't you just save the state of the scroll, and set it back after re-render? |
Hi @thomashoddinott!
Unfortunately, I didn't have enough time for that yet. And there is also a technical problem: synchronized scrolling requires that the generated HTML contains line numbers information, and not all nodes provide this information: https://stackoverflow.com/q/58359284.
This problem can be fixed without implementing proper synchronized scrolling. I have just pushed commit a2b4bef which should make it better. For me, it fixes jumping to top when I edit reStructuredText documents with math. Can you please test it? |
Hi @mitya57, I tested it today and it's working. Thanks for your help. |
With the latest commit in pymarkups module, synchronized scrolling should be working with reStructuredText too (provided that WebKit or WebEngine renderer is used). You can test it with the following command:
Any feedback is welcome! |
Hi, just to say that I was looking why synch scrolling was not working with reStructuredText, I installed pymarkups as suggested here above and now, when enabling "webkit rendering" the auto scroll is working as expected. Great tool! Gauthier |
With a long rst document I have to constantly scroll the preview pane to the area where I'm editing. It would be nice if the preview would track where you are editing and go to that spot on reload to prevent the user from having to manually scroll the preview window.
The text was updated successfully, but these errors were encountered: