wion / tWriter.tmbundle

An extended Textile bundle for TextMate.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cmd B and Cmd I behaviour

wion opened this issue · comments

commented

iA Writer scenario:

A) A user can select a string of text then hit Cmd B or Cmd I to apply **strong** or *emphasis* respectively. The string will remain selected (until you change it), so if you immediately hit the keys a second time, the applied format is removed again back to regular text. This is exactly how it works here in GitHub, so I'm guess this is the standard behaviour for applications?

B) After a string is marked up with bold/strong or italic/emphasis, you can remove the wrapping syntax (thus the formatting) from both sides of the string by backspacing over the beginning or ending marks; either way it automatically removes the opposite marks too. This is desired!

tWriter scenario:

A) Compared to above, when Cmd B or Cmd I is used, *strong* or _emphasis_ is applied as expected, but the string is then deselected and the cursor position advances to the end of the string. In Textile's case, this might be a good behaviour because of the difference in markup syntax. In this case, if you want to make the string **bold** or __italic__, you select the string again and hit the appropriate key combo again. It would also be good if the backspace trick on one mark removed all wrapping marks, as in B above, because a single hit of the backspace key is easier than another key combo hit, as in A above.

B) Unfortunately, tWriter does not follow the behaviour of removing syntax marks on both sides by backspacing over just one side or the other. This needs changed to situation B above.

So, if we can get tWriter's B situation equal to iA Writer's B situation, then what is the desired behaviour for tWriter's (A) situation? Either:

  1. Make it like iA Writer's A, where strings remains selected and a second hit removes formatting?
  2. Make it remain selected but a second hit adds another pair of the same marks? (For bold or italic, respectively.)
  3. Leave it alone so that a backspace from the end of the string position removes formatting, if so desired? (Which is kind of like a better situation than the first option, because it's an easier key stroke.)
commented

Btw, I would not know how to change these, but it must be possible.