-
-
Notifications
You must be signed in to change notification settings - Fork 46
Apply formatting to current word when there is no selection #57
Comments
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? |
That's an interesting point: the TextMate 2 behaviour is to trigger it again: 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 |
@adunning i added this behaviour in the latest release. please try it out 👯 |
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 |
Em. I see the problem with |
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! |
Presently, if the cursor is placed in the middle of the word and one of the formatting commands is invoked, one will merely receive the appropriate characters on each side of the cursor. With the TextMate Markdown package (see https://github.com/textmate/markdown.tmbundle/tree/master/Commands), this action will result in the formatting being applied to the entirety of the current word (minus any punctuation), which is useful; would it be possible to implement this?
The text was updated successfully, but these errors were encountered: