Sublime Forum

Set up surround to work for `

#1

Hi

I’m doing quite a lot of markdown for my daily little doc. I would like to be able to surround selected text with back quote ` as I’m doing with ’ or ". Is there a way to set up Sublime for that ?

Or should I use a sublime plugin for that, saw there are some but I’m not sure whether I should rely a lot on plugin when last update is 3 years ago, sublime 2 & 3 compatible… ?

While I’m arround, the markdown syntax highlighting doesn’t seems to work in latest 3.114, is that me or a know issue ?

Best regards,
Rémy

0 Likes

#2

If you take a look at the default keybinding for when there is a non-empty selection:

{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
        [
            { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
        ]
},

it stands to reason that you can just replace all instances of ' with ` and save it to your user keybindings :slightly_smiling:

Can you describe more about what isn’t working with Markdown syntax highlighting in 3114? There are a load of issues with it, but it should be working to some degree… https://github.com/sublimehq/Packages/issues/266

0 Likes

#3

Oh hell yeah, beautiful. Question answered as far as ` is concerned.

While I’m in keybind, one remark : Ctrl+` for open panel is never gonna work on a french azerty keyboard, whose mapping for ` is alt-gr+7, hence sublime doesn’t understand Ctrl+Alt Gr+7

Regarding syntax issue, as you can see there’s none, either with MarkDown or MultiMarkdown.

0 Likes

#4

about Markdown, what color scheme are you using?

and if you put your text caret / selection on, say, the B in # Backup & Restore and go to Tools -> Developer -> Show Scope Name, what does it show?

0 Likes

#5

That’s Pastel on dark. I tried half of the color scheme, still the same issue.

Here is the scope: text.html.markdown meta.block-level.markdown markup.heading.markdown entity.name.section.markdown

0 Likes