From f7404c9d39cfa3c230db632874f257f6793d1daf Mon Sep 17 00:00:00 2001 From: Abdelghani ALIDRA Date: Tue, 17 Dec 2024 11:30:28 +0100 Subject: [PATCH] define specific keybindings for Mac OS and update README.md --- editors/vscode/README.md | 8 +++++--- editors/vscode/package.json | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index f7ed6475b..3ebba8b96 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -8,8 +8,8 @@ You can navigate in proof with the following key-bindings: ***Linux and Windows*** - ``Ctrl+Right``: go one step forward - ``Ctrl+Left``: go one step backward -- ``Ctrl+Up``: go to the previous proof * (or the beginning) -- ``Ctrl+Down``: go to the next proof * (or the end) +- ``Ctrl+Up``: go to the previous proof (or the beginning) +- ``Ctrl+Down``: go to the next proof (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highligsht is always centered in the window when keybindings are pressed) @@ -18,12 +18,14 @@ You can navigate in proof with the following key-bindings: ***Mac OS X*** - ``Ctrl+fn+Right``: go one step forward - ``Ctrl+fn+Left``: go one step backward +- ``Ctrl+Up``: go to the previous proof (or the beginning) +- ``Ctrl+Down``: go to the next proof (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window -For `go to the previous proof` and `go to the next proof`, Key bindings need to be changed in Code->Preferences->keyboard shortcuts (also reachable with Command+K Command+S) because default ones are used by Mac OS X +Please note that these key bindings can be changed in Code->Preferences->keyboard shortcuts (also reachable with Ctrl+K Ctrl+S or Command+K Command+S in Mac OS X). **Hover and go-to-definition** diff --git a/editors/vscode/package.json b/editors/vscode/package.json index fb7e5e3e9..d8d7edbb5 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -138,12 +138,22 @@ { "key": "ctrl+up", "command": "extension.lambdapi.pv", - "when": "editorTextFocus && editorLangId == lp" + "when": "editorTextFocus && editorLangId == lp && (isWindows || isLinux)" }, { "key": "ctrl+down", "command": "extension.lambdapi.nx", - "when": "editorTextFocus && editorLangId == lp" + "when": "editorTextFocus && editorLangId == lp && (isWindows || isLinux)" + }, + { + "key": "ctrl+alt+up", + "command": "extension.lambdapi.pv", + "when": "editorTextFocus && editorLangId == lp && isMac" + }, + { + "key": "ctrl+alt+down", + "command": "extension.lambdapi.nx", + "when": "editorTextFocus && editorLangId == lp && isMac" } ], "snippets": [