skip to Main Content

I am using quarto on VS Code, and need a keyboard shortcut to add delimiters to a selected word or words. For instance, considering the words

thank you

the keyboard shortcut should return

`thank you`

2

Answers


  1. Not a fail-safe solution, but you can always use the ‘global search & replace’ option of VS-code. To limit the amount of hits, you can put a filter on which files to include in the search.

    A shortcut for this is cmd + shift + r on Mac or control + shift + r on Windows

    enter image description here

    Login or Signup to reply.
  2. define the following key binding

    {
      "key": "ctrl+k ctrl+i",  // or any other combo
      "command": "editor.action.insertSnippet",
      "when": "editorTextFocus",
      "args": {
        "snippet": "`${TM_SELECTED_TEXT}`$0"
      }
    }
    

    Select the text and press key binding.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search