mirror of
https://github.com/fscotto/infra.git
synced 2026-11-25 21:29:51 +00:00
Manage VS Code keybindings for GNOME desktops
Deploy user-level keybindings.json from vscode_keybindings so Alt+J toggles the terminal and the panel from the terminal. Keys avoid Ctrl+<letter> to leave Vim motions untouched. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -144,3 +144,12 @@ vscode_extensions:
|
|||||||
- saoudrizwan.claude-dev
|
- saoudrizwan.claude-dev
|
||||||
- vscodevim.vim
|
- vscodevim.vim
|
||||||
vscode_settings: null
|
vscode_settings: null
|
||||||
|
# User-level keybindings apply to every window, including Dev Containers, SSH and WSL remotes.
|
||||||
|
# Keys avoid Ctrl+<letter>, which the Vim extension uses for its motions; Alt is not bound by Vim.
|
||||||
|
vscode_keybindings:
|
||||||
|
- key: alt+j
|
||||||
|
command: workbench.action.terminal.toggleTerminal
|
||||||
|
when: "!terminalFocus"
|
||||||
|
- key: alt+j
|
||||||
|
command: workbench.action.togglePanel
|
||||||
|
when: terminalFocus
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
group: "{{ user_group }}"
|
group: "{{ user_group }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
when: vscode_settings is not none
|
when: vscode_settings is not none or vscode_keybindings | length > 0
|
||||||
|
|
||||||
- name: Deploy explicitly managed VS Code settings
|
- name: Deploy explicitly managed VS Code settings
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -58,3 +58,13 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
backup: true
|
backup: true
|
||||||
when: vscode_settings is not none
|
when: vscode_settings is not none
|
||||||
|
|
||||||
|
- name: Deploy managed VS Code keybindings
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ user_home }}/.config/Code/User/keybindings.json"
|
||||||
|
content: "{{ vscode_keybindings | to_nice_json }}\n"
|
||||||
|
owner: "{{ username }}"
|
||||||
|
group: "{{ user_group }}"
|
||||||
|
mode: "0644"
|
||||||
|
backup: true
|
||||||
|
when: vscode_keybindings | length > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user