-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Edit in external editor #749
Comments
Hmm, that would be very useful also for file attachments (e.g. word documents etc.) |
I did not think about the attachments, that is a really good point too. |
for the code notes it would be soooo practical ! It would even be relatively simple to implement (at least on linux):
I have a shortcut on my system which opens clipboard buffer in vim to edit it before pasting it somewhere, so from now i use it to edit most of my code notes, but it's less efficient, because i need to:
|
This is the hard part - it is possible to know when the editor is closed when the editor is spawned as a new process from trilium. But in many use cases it would make more sense to open it in an existing process (e.g. new tab in VS Code). Also to spawn it as a process the trilium would have to know exact command to run, I don't think it's possible to use the native OS application selection dialog ... |
Why not take a look at Joplin's code to see how they did it there? It works great with it. I realize that Joplin is a flatfile system but still it might be helpful. It is an Electron app too, so maybe the code can be used easily. I use that functionality in Joplin on WIndows and Linux, and I have not met a glitch with it. It also does not block Joplin during that time. |
My knowledge of windows internals is very bad. But for linux at least you can list processes having an active file descriptor to a file ( But really it's harder to realiably implement. |
Hope can be integrated the editor (https://github.com/nhn/tui.editor), feel it is a more modern editor, user experience is very good, support for markdown is better, and supports uml syntax, etc. |
|
This would be useful, I personally have an entire year of notes made in Typora (uses github flavoured markdown) and I can't really refer to / edit them in trillium, being able to open them in Typora would help |
There is a related issue on the upstream library used for math that you can look at: isaul32/ckeditor5-math#10 |
Opening in the web browser is the fallback in cases no application is associated with this file type in the OS. |
I see. And for HTML files (which seems to be the type for text notes), I might even just have the browser associated. So I'll try associating an editor with HTML files and see if it helps. I suspect people other than me might be hitting this issue, though. Having the browser associated with HTML is probably a common setting, but browsers aren't useful for editing. So it might still be useful to allow the user to open in an alternative program other than the associated one - like an editor. |
Yes, I agree but I'm not sure if it's possible to show/choose application to open with in electron. Electron API always seems to use the default associated application: https://www.electronjs.org/docs/api/shell |
Hi
I think that being able to edit the current note in an external editor can be very useful especially for Markdown since the Trilium does not render .md at all beside showing it as text.
Joplin provides this functionality, Ctr-E opens the text in an external editor of choice, and the content is updated when the user saves the page in that editor.
Trying to edit a file externally and bringing it back is quite a bit of involved atm.
thanks
The text was updated successfully, but these errors were encountered: