vscode 터미널 키 바인딩 (Mac)

개발환경 셋팅

Posted by jopemachine on February 15, 2021 Updated on November 19, 2021

문제

vscode 터미널에서 cmd +left, cmd + right 키를 사용하여 단어 사이를 오갈 수 있게 키를 바인딩 하고 싶다.

방법

  1. 커맨드 팔레트를 연다 (cmd + shift + p)
  2. Open Keyboard Shortcuts (JSON) 를 검색
  3. 아래 텍스트를 복사 붙여넣기 한다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    ...
    {
        "key": "cmd+left",
        "command": "workbench.action.terminal.sendSequence",
        "args": {
            "text": "\u001bb"
        },
        "when": "terminalFocus && !terminalTextSelected"
    },
    {
        "key": "cmd+right",
        "command": "workbench.action.terminal.sendSequence",
        "args": {
            "text": "\u001bf"
        },
        "when": "terminalFocus && !terminalTextSelected"
    }
    ...

출처

  1. Integrated Terminal
  2. Forward Backward Words in the Vscode Terminal