[Enhancement] integration with third party code editors #949

Open
opened 3 months ago by qwerty287 · 4 comments

The code editor is just not good. The text input view is to small, it doesn't support code highlighting like the viewer etc. Okay, maybe I don't need this on a phone, but the input view should be almost fullscreen. And as for the syntax highlighting, there is a code editor library/application named Squircle IDE. The README contains a complete documentation, but it's written for Kotlin, so you would have to convert it to Java, but that's not that difficult.
Thanks!

The code editor is just not good. The text input view is to small, it doesn't support code highlighting like the viewer etc. Okay, maybe I don't need this on a phone, but the input view should be almost fullscreen. And as for the syntax highlighting, there is a code editor library/application named [Squircle IDE](https://github.com/massivemadness/Squircle-IDE). The README contains a complete documentation, but it's written for Kotlin, so you would have to convert it to Java, but that's not that difficult. Thanks!
Collaborator

I don't think this is a good idea. We can of course make improvements to our TextViews and TextAreas but depending on all sorts of code or even maintaining a Java fork of another library just makes GitNex more prone to failure (#853 and #893 are perfect examples of this).

I think we're better off working on some sort of interface between GitNex and code editing apps like "Squircle IDE".

We could follow FileZilla's approach here:

  1. Download the file to external storage
  2. Ask with which application you'd want to open this particular file
  3. After exiting the (code editing) application check whether the file has changed (either by comparing the file timestamp or by checking if the file hash has changed; last one may be a bit unreliable as hash collisions can occur sometimes) and ask if the user wants to discard or save their changes.
I don't think this is a good idea. We can of course make improvements to our ``TextView``s and ``TextArea``s but depending on all sorts of code or even maintaining a Java fork of another library just makes GitNex more prone to failure (#853 and #893 are perfect examples of this). I think we're better off working on some sort of interface between GitNex and code editing apps like "Squircle IDE". We could follow FileZilla's approach here: 1. Download the file to external storage 2. Ask with which application you'd want to open this particular file 3. After exiting the (code editing) application check whether the file has changed (either by comparing the file timestamp or by checking if the file hash has changed; last one may be a bit unreliable as hash collisions can occur sometimes) and ask if the user wants to discard or save their changes.
opyale added the
Discussion
label 3 months ago
Poster

That's a nice idea too. For me it's not important, as long as I can use a better code editor than the current one.

That's a nice idea too. For me it's not important, as long as I can use a better code editor than the current one.
qwerty287 changed title from [Enhancement] Better code editor to [Enhancement] work with third party code editors 3 months ago
Collaborator

Yes, that I would appreciate too. Also, with this approach everyone can use their favorite code editor which I think is much better than "using one to rule them all".

Yes, that I would appreciate too. Also, with this approach everyone can use their favorite code editor which I think is much better than "using one to rule them all".
opyale added the
Enhancement
Long-term
labels 3 months ago
Poster

@oqyale FYI Kotlin runs with Java VM so you don't have to port anything, it's fully compatible to Java, the only problem would be that you can't use the docs🙂

@oqyale FYI Kotlin runs with Java VM so you don't have to port anything, it's fully compatible to Java, the only problem would be that you can't use the docs🙂
qwerty287 changed title from [Enhancement] work with third party code editors to [Enhancement] integration with third party code editors 3 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.