difficult to mark fenced code blocks
Now that fenced code blocks are more 'common', I tried to convert some old documents to use this type of blocks, but I find it quite annoying to type at the moment.
As soon as I start writing backticks it's rather impossible to write 3 backticks, because as soon as I have 2, it automatically inserts the third and my cursor is in between the 2nd and 3rd backtick.
so ```xml becomes ``xml`
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Fletcher on 31 Jul, 2013 12:51 PM
Upgrade to the latest version.
Fletcher closed this discussion on 31 Jul, 2013 12:51 PM.
pprazzi re-opened this discussion on 31 Jul, 2013 12:55 PM
2 Posted by pprazzi on 31 Jul, 2013 12:55 PM
Thanks for your message.
I already have the latest version Version 2.4.2 (24) running - is there another one?
Support Staff 3 Posted by Fletcher on 31 Jul, 2013 01:12 PM
Then perhaps I'm not understanding correctly. In 2.4.2, if you type the "`" character, you will get (where "|" represents the cursor:
`|`
Type "`" again, and you get ("closing" the pair and allowing you to move on):
``|
Once more:
```|
So you simply hit the "`" key three times to get three characters in a row. In other words, once there are two "smart pair characters in a row", Composer stops interpreting them as smart pairs, and just inserts what you type.
Is this not what is happening for you?
4 Posted by pprazzi on 31 Jul, 2013 01:18 PM
I have the following
`| (no additional backtick)
``|` (it closes the second tick)
```|``
so when I type three backticks I have four and my cursor is in between the 3rd and the 4rd.
To make sure nothing else is causing, I disabled textexpander (but I have nothing special defined for backticks)
Support Staff 5 Posted by Fletcher on 31 Jul, 2013 01:21 PM
What language/keyboard are you using?
6 Posted by pprazzi on 31 Jul, 2013 01:27 PM
My OS language is English
My Region settings are Belgium
And my keyboard is also Belgian
See also the attached screenshot
Support Staff 7 Posted by Fletcher on 31 Jul, 2013 11:58 PM
Which key are you using to type the "`" character? Is it the key underneath the delete key? Are you pressing any modifiers (e.g. control, command, option, etc)?
What happens when you type the same keys in TextEdit?
8 Posted by pprazzi on 01 Aug, 2013 06:59 AM
Hi Fletcher,
I've attached an image of a Belgian keyboard. You can easily simulate the behavior by opening 'KeyBoard preference's and then add an Input Source for 'Belgium' and select that keyboard. The backtick is left to the return key (no need to press any modifier)
I did the same and selected 'US' keyboard (where it's right to the left shift key), and there it works as expected
Support Staff 9 Posted by Fletcher on 01 Aug, 2013 12:35 PM
The key map I have for "Belgian" is different than the photo you sent. The "`" key is flagged yellow/orange, meaning it's used to add a diacritical mark.
So if you hit that key once (say, in TextEdit), the "`" character isn't highlighted yellow?
10 Posted by pprazzi on 01 Aug, 2013 12:42 PM
Yes, it is marked yellow too.
However I can type three "`" characters in a row in TextEdit, but in MMD Composer I cannot because typing 3 "`" gives me four "`" characters with my cursor between the 3rd and 4rd "`"
Support Staff 11 Posted by Fletcher on 01 Aug, 2013 12:55 PM
That yellow marked characters isn't a "real" "`" character. It's a partially completed diacritical mark (the yellow flags that it's not finished yet). (Forgive any improper terminology --- discussing those things wasn't a big part of US education.... ;)
There should be another key combination to type an actual "`" character. The keyboard view on my machine says you have to hold the Control key on the Belgian keyboard, and it should be in the upper left.
When you type three in a row with your method, you're saying:
let's do a "`" as a diacritic;
wait, never mind, turn that one into a regular "`" and then add another "`" as a diacritic.
wait, never mind, turn that one into a regular "`" and then add another "`" as a diacritic.
wait, here's a space character -- turn that last diacritic into a regular "`" and let's keep going.
Because of this, Composer isn't quite sure what you're doing and doesn't recognize the yellow "`" since it's not technically a completed character.
It should work properly if you use the other key. (For some reason, I can't use the control key and the Belgian keyboard, so I can't test it on my machine.
12 Posted by pprazzi on 01 Aug, 2013 01:07 PM
I clearly understand what you mean, even without US education ;-)
And I also see when holding the Ctrl key in the Keyboard viewer, the color yellow dissapearing for the "`" character and it looks like a regular "`" (in fact there is another one right to my left shift key, as on the US keyboard). However, when hitting Ctrl and "`" nothing is typed at all, not in MMD Composer, not in TextEdit
In fact that combination doesn't work in any editor. Typing three "`" however works in every program expect MMD Composer.
To be honest, I hate Belgian keyboards myself, most of the time I use a UK or US keyboard, but people over here (and in fact all French speaking countries) use similar keyboards, so they will have the same problem with "`" in MMD Composer.
Maybe using backticks for fenced block wasn't a good idea after all.
13 Posted by pprazzi on 01 Aug, 2013 01:30 PM
To illustrate - 2 movies attached
1. TextEdit
2. MMD Composer
14 Posted by pprazzi on 01 Aug, 2013 01:48 PM
I found a solution:
I removed the backticks from the 'Enable Smart Pairs' list, and now it works as expected.
ps. Fletcher, thanks for the great program, I really like MultiMarkDown Composer a lot.
Support Staff 15 Posted by Fletcher on 01 Aug, 2013 07:17 PM
Yeah -- disable smart pairs seems to be the only workaround, but it's not a true solution since some users find it helpful to automatically wrap text in backticks....
Perhaps there is a problem with the Belgian keyboard layout? I assumed it was because I don't actually have a Belgian keyboard that the Ctrl-` wouldn't work for me. But if it also doesn't work for you, maybe that's the problem? I tried some other keyboard layouts, however, and had similar problems.
I'm at a bit of a loss. But it still seems to me that the problem is fundamentally that the computer is not allowing you to properly type a "`" character without cheating, and the cheating is not compatible with the idea of smart pairs.
If you learn anything else, I'm happy to revisit this issue. But I'm just not sure what I can do at this point.
I am glad to know that you enjoy Composer --- I still use it daily myself!
Fletcher closed this discussion on 01 Aug, 2013 07:17 PM.
pprazzi re-opened this discussion on 03 Aug, 2013 07:00 AM
16 Posted by pprazzi on 03 Aug, 2013 07:00 AM
One thing I've noted, if you press the spacebar after a "`", it escapes it's diacritical state.
This helps when typing a code block starting with any of the characters that can have accents (i.e. when you want to type "`end`", you need to type "`<spacebar>end`" otherwise it ends up as "ènd`"
Support Staff 17 Posted by Fletcher on 03 Aug, 2013 08:38 PM
Yeah. But this is still a workaround, and I suspect not the proper way to type a "backtick" character on a Belgian keyboard.
F-
--
Fletcher T. Penney
Manager, Founder
MultiMarkdown Software, LLC
[email blocked]