トップ 差分 一覧 Farm ソース 検索 ヘルプ PDF RSS ログイン

Diary/2021-10-8

Windwos Terminalの設定

Windows11では,デフォルトでWindows Terminalが入っていて嬉しい.
が,ctrl-vがcopy, ctrl-vがpasteになっていてsshでどこそこログインして使うには面倒.
キーバインドの設定がJSONでできるので,
ctrl-cとctrl-vを,それぞれctrl-shift-cとctrl-shift-vに変更.

   // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
   "actions":
   [
       // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
       // These two lines additionally bind them to Ctrl+C and Ctrl+V.
       // To learn more about selection, visit https://aka.ms/terminal-selection
       //{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
       { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+shift+c" },
       //{ "command": "paste", "keys": "ctrl+v" },
       { "command": "paste", "keys": "ctrl+shift+v" },

       // Press Ctrl+Shift+F to open the search box
       { "command": "find", "keys": "ctrl+shift+f" },

       // Press Alt+Shift+D to open a new pane.
       // - "split": "auto" makes this pane open in the direction that provides the most surface area.
       // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
       // To learn more about panes, visit https://aka.ms/terminal-panes
       { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
   ]