-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add line numbers to preview window #31
Comments
+1 I have been thinking about line numbers as well. I wonder what the best way to do this would be.. |
Well, mate... I'm counting on your to figure that out. But I have faith in you. 👍 |
Hahahaha oh, thanks! I have also been thinking about making the PreviewView an actual EditorView with an Editor and Atom Preview would act as a virtual Atom user and apply changes to the Editor (model) which would propagate to the EditorView. This would make this issue, #25 (font-size syncing), and #27 (theme applying) mute because all of those are to make the PreviewView act like an EditorView. Now to figure out the best way to do that.. 😉. |
I would guess you could start by extending The main issue is that there isn't an API yet for creating a read-only editor so by default save, editing, will be possible. |
That may be too naive here, but could you listen to a key-down event in that preview pane and prevent Default from inserting a character? |
That might work, you may want to try first just hiding the That won't cover commands triggered via the command palette or system menus though, you'll need to override some methods in |
I think I'd be willing to sacrifice the forceful read-only, especially if users are thinking of using it for saving purposes versus my original intention of view-only. If it does bother too many users I'm sure we can figure something out when the time comes. @kevinsawicki is there any documentation / packages source code that you'd recommend I read over to get started developing such that it is a true EditorView? I'm getting fairly familiar with the Atom source code, however it would be nice to see another package that creates it's own EditorView in a new tab so I could see an example of what that would look like. Hopefully this is something we (or I 😉) could wrap up tonight and squash out 3 issues in one! 👍 |
Tons of packages create |
No problem. I should be okay with the extending. I'll keep everyone posted on my progress later tonight. Thank you again for your help and support! |
Great job so far @Glavin001! |
👍 |
@ddavison which issues would you like to tackle? Maybe this is something of interest to you 😉 |
@Glavin001 If you don't take it again. two issues assigned to me were handled by you! 😆 |
Sorry, I do that sometimes 😆 .. All yours 😄 ! |
Just confirming I installed the new 0.9.0 update and it works like a charm. Just needed a manual Thanks! |
Thank you for testing and letting me know! Really glad to hear it is working. |
I wonder if it's worthwhile having a gutter with line numbers on the preview.
I'm thinking of the ability to point out relationships between a line in the left with one in the right - say, via further plugins, or even just in screenshots, drawing arrows by hand if one wanted to. For example for documentation, tutorials etc:
"See how differently this is implemented in coffeescript versus javascript in line 5 / 10"...
The text was updated successfully, but these errors were encountered: