Giter VIP home page Giter VIP logo

Comments (8)

uranusjr avatar uranusjr commented on May 22, 2024

I’m not familiar with nvALT, but at least TextEdit doesn’t work for me. Maybe my configuration is off?

Not sure how this works internally for nvALT, but I’ll look into it when I can.

from macdown.

die4live avatar die4live commented on May 22, 2024

TextEdit doesn't bind with .md extension, so can't open these markdown
files in nvAlt, while .txt file is ok to open with TextEdit. I guess
maybe MacDown should register .md filetype somewhere in MAC OS (don't
know the inner way how it works), then nvAlt will detect and able to
use MacDown as external editor of .md files.

On 7/9/14, Tzu-ping Chung [email protected] wrote:

I’m not familiar with nvALT, but at least TextEdit doesn’t work for me.
Maybe my configuration is off?

Not sure how this works internally for nvALT, but I’ll look into it when I
can.


Reply to this email directly or view it on GitHub:
#54 (comment)

from macdown.

uranusjr avatar uranusjr commented on May 22, 2024

OS X uses UTIs instead of extensions to detect file formats, so extensions shouldn’t matter. TextEdit registers itself to public.data, which text formats should conform to, so it is strange to see that it it considered not able to open anything. MacDown does the same thing.

Anyway, I should probably ask the developer of nvALT how exactly I can approach this.

from macdown.

die4live avatar die4live commented on May 22, 2024

Well in my nvALT, TextEdit is able to open .txt file and other not registered plain text filetype. By the way, in nvALT preference Notes - Storage tab, you can set default file extension and types of file to recognize if use the Plain Text Files strategy, don't whether it concerns. And maybe you could check which formats Mou registered as it works well as my formal external editor in nvALT. And of course the best way is to contact the author:)

from macdown.

uranusjr avatar uranusjr commented on May 22, 2024

I’ve talked to the developers of nvALT, and they are not sure where the problems, either. According to them there have been similar reports from other editor apps, too.

My current guess is that nvALT is not configured to accept editors that don’t target rich text formats. Which is plausible, since they inherited that part of code from the original nv, which is a rich text editor in essence, without much change. I’ll try to poke around inside nvALT’s source and see what I can find to confirm/reject this.

from macdown.

uranusjr avatar uranusjr commented on May 22, 2024

Alright, here’s the result. nvALT (actually nv) is pretty picky when it decides whether an application can handle a certain type of document. In order to become usable as an external editor you need to declare yourself capable of writing to a file type (in this case UTI public.text). MacDown was originally configured to be only editor to Markdown (UTI net.daringfireball.markdown), and converts public.text files to Markdown when you save the file in it, so nv doesn’t work well with it.

I’ve loosen the restriction to make MacDown capable of being an editor (instead of viewer) to public.text. Other application should now be able to treat it as a standard text editor, including nvALT. I’ve uploaded a test build here so that you can make sure that things work correctly. If no more problem occurs, this will be included in the next release.

from macdown.

die4live avatar die4live commented on May 22, 2024

Try the new one and it works well with .md and .txt filetype. Nice job! However, other plain text file with custom extension name still can't be open with MacDown while Mou can:< As a foo.md file can be open within nvALT using MacDown, but once rename it to foo.bar, it will fail to open.

Would you please do some extra work to expand the support to all native plain text?

from macdown.

uranusjr avatar uranusjr commented on May 22, 2024

To make arbitrary extensions work I’ll need to claim editor to all file formats, and I don’t really want to do that. nv doesn’t do a very good job setting appropriate UTIs when it saves things, and I think this should be fixed there instead.

Maybe I’ll look into this problem when I get the time, but the bottom line is that the problem now belongs to nv (and nvALT), not MacDown.

from macdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.