Skip to content

Commit

Permalink
define specific keybindings for Mac OS and update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alidra committed Dec 17, 2024
1 parent 8500d1e commit f7404c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
8 changes: 5 additions & 3 deletions editors/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sup>*</sup> (or the beginning)
- ``Ctrl+Down``: go to the next proof <sup>*</sup> (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)
Expand All @@ -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**

Expand Down
14 changes: 12 additions & 2 deletions editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit f7404c9

Please sign in to comment.