Cron3x
Cron3x

Reputation: 15

Weird Question: VSCode marked text surrounded with character

I know, its a weird question, but is there a way to make the selected text surrounded by two charakters like in 4coder?

e.g. ⌊Selected Text⌉

Thanks!

Upvotes: 0

Views: 35

Answers (1)

rioV8
rioV8

Reputation: 28693

You can use a snippet on a key binding:

{
  "key": "ctrl+k 1", // or some other combo
  "command": "editor.action.insertSnippet",
  "when": "editorTextFocus",
  "args": {
    "snippet": "[${TM_SELECTED_TEXT}]$0"
  }
}

Upvotes: 1

Related Questions