diff --git a/README.md b/README.md index 3a93cba..736480f 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ home-manager switch --flake github:Logan-Lin/nix-config#yanlin | `e` | Normal | Toggle file explorer | | `w` | Normal | Save file | | `q` | Normal | Quit | +| `o` | Normal | Open file with system default app | | `y` | Normal/Visual | Copy to system clipboard | | `p` | Normal/Visual | Paste from system clipboard | | `gs` | Normal | Git status | diff --git a/nvim.nix b/nvim.nix index 7c65a8a..509359e 100644 --- a/nvim.nix +++ b/nvim.nix @@ -132,6 +132,14 @@ options = { desc = "Replace selection with system clipboard"; }; } + # System integration + { + mode = "n"; + key = "o"; + action = ":silent !open %"; + options = { desc = "Open file with system default app"; }; + } + # Git keymaps (vim-fugitive) { mode = "n";