Skip to content
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

Choose external editor app according to one file's extension #219

Open
Vigilans opened this issue Oct 3, 2017 · 4 comments
Open

Choose external editor app according to one file's extension #219

Vigilans opened this issue Oct 3, 2017 · 4 comments
Assignees
Labels

Comments

@Vigilans
Copy link

Vigilans commented Oct 3, 2017

I am using MarkdownX as an editor for my .md files, and when opening an .md file in my native file browser, I could see MarkdownX as an available choice.

However, when I was to edit an README.md file using MGit and tried to open an external editor to better modify it, the MarkdownX choice has gone.

I tried other files with different extensions (such as .cpp) in the same way, and discovered that they all showed identical app choices. Therefore, I guess that MGit might treat all this files as the same format, for example, "text file".

Am I right? If so, would it be possible to treat files with various extensions differently 0.0 ? I had wished to edit them in such way, just for a better experience...

#206

@Vigilans Vigilans changed the title Choose external editor app according to file extension Choose external editor app according to file's extension Oct 3, 2017
@Vigilans Vigilans changed the title Choose external editor app according to file's extension Choose external editor app according to a file's extension Oct 3, 2017
@Vigilans Vigilans changed the title Choose external editor app according to a file's extension Choose external editor app according to one file's extension Oct 3, 2017
@maks
Copy link
Owner

maks commented Oct 4, 2017

Thank you for reporting this.
Looks like markdown and a number of other file types are not correctly mapped to their respective mimetypes using the api that MGit makes use of, Instead MGit just uses "text/plain" as the mimetype, along with the files url in the Intent it uses to select available apps with which to open the file externally.

On the MarkdownX I believe I've tracked down its source code and this is the manifest where it registers for the markdown mimetypes which ironically should work with the Intent that MGit creates, so I will need to investigate further what is happening.

@maks maks self-assigned this Oct 4, 2017
@maks maks added the bug label Oct 4, 2017
@Vigilans
Copy link
Author

Vigilans commented Oct 4, 2017

⊙∀⊙ Thank you for your quick reply!
I had also tried the MarkdownEditors app in the link you provide, and it failed as well...

My OS is MIUI, an Android ROM with some deeper customizations. I am not clear whether it could have some influence on this problem...

@maks
Copy link
Owner

maks commented Oct 4, 2017

@Vigilans-Yea no using MIUI is not the issue, I have a test device running MIUI and its behaviour is the same.
Sorry no what I meant was that there was a comment saying that the MarkdownEditors repo was the source code for MarkdownX app, though I have not checked if that is actually the case as that repo is in Chinese.
Anyways, I just need to set aside some time to look into this further, I'll update here once I've done that.

@Vigilans
Copy link
Author

Vigilans commented Oct 4, 2017

@maks

I had also tried the MarkdownEditors app in the link you provide, and it failed as well...

Oh...my fault for not saying it clearly _ (:з」∠) _ Before opening this issue, I have also found the issue you mentioned and have already tested the MarkdownEditors with the same outcome as MarkdownX.

As for whether or not it's the source code for MarkdownX, the MarkdownEditors repo declares that part of its UI and functions are modelled on MarkdownX, and MarkdownX itself is not open-source.

But I guess many of their mechanisms (such as the code you provided above) are the same , and thus it doesn't matter that much...

Anyway, so grateful for your response and wish you a plain sailing in your investigation (ง •̀_•́)ง

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants