GithubHelp home page GithubHelp logo

Comments (6)

zhuochun avatar zhuochun commented on September 3, 2024

May I confirm the behavior when cursor is is inside a middle of the formatted text, and trigger the format command again? It will toggle format or insert format?

from md-writer.

adunning avatar adunning commented on September 3, 2024

That's an interesting point: the TextMate 2 behaviour is to trigger it again: **bolded** becomes ****bolded**** if one moves the cursor back into the word and types + b a second time. Removing it the second time would probably be more ideal, but I'm not sure whether that's feasible.

In my experience, the main undesirable aspect of the TextMate implementation is that, if the cursor is placed after a piece of punctuation at the end of a word and + i (etc.) is invoked, one gets something like example*,*. (I would expect either *example,* or *example*,.)

from md-writer.

zhuochun avatar zhuochun commented on September 3, 2024

@adunning i added this behaviour in the latest release. please try it out 👯

from md-writer.

adunning avatar adunning commented on September 3, 2024

That's absolutely wonderful; thank you! The only oddity I'm seeing is that it's being invoked twice every time, appending additional characters to the word: placing the cursor in word and typing + b results in **word******.

from md-writer.

zhuochun avatar zhuochun commented on September 3, 2024

Em. I see the problem with **word**_, becomes **word****_**,. Might due to how Atom handles the boundary between word and non-word chars. I will check again :D

from md-writer.

adunning avatar adunning commented on September 3, 2024

That's fairly minor; your implementation is even better than TextMate's otherwise. The problem I was having with the commands being run twice disappeared after I uninstalled the package and re-added it. Thanks again!

from md-writer.

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.