diff options
author | sils <sils@sils.li> | 2023-08-22 17:01:21 +0200 |
---|---|---|
committer | sils <sils@sils.li> | 2023-08-22 17:01:21 +0200 |
commit | d1cbd90ef3594189cacbca188df233047ccd853c (patch) | |
tree | 413365c8fd12515cd356205d58b2731952f73ad2 | |
parent | Feat(u/sils/packages): Re-Add libreoffice (diff) | |
download | nix-config-d1cbd90ef3594189cacbca188df233047ccd853c.tar.gz nix-config-d1cbd90ef3594189cacbca188df233047ccd853c.zip |
Feat(u/sils/nixvim): Add keymaps to exit terminal mode conveniently
Diffstat (limited to '')
-rw-r--r-- | users/sils/nixvim/default.nix | 6 | ||||
-rw-r--r-- | users/sils/nixvim/maps/default.nix | 20 |
2 files changed, 25 insertions, 1 deletions
diff --git a/users/sils/nixvim/default.nix b/users/sils/nixvim/default.nix index f5fe379..66134e9 100644 --- a/users/sils/nixvim/default.nix +++ b/users/sils/nixvim/default.nix @@ -1,4 +1,7 @@ -{...}: { + let + maps = import ./maps; + in + { programs.nixvim = { enable = true; options = { @@ -9,6 +12,7 @@ scrolloff = 999; }; colorschemes.gruvbox.enable = true; + inherit maps; plugins = { airline = { enable = true; diff --git a/users/sils/nixvim/maps/default.nix b/users/sils/nixvim/maps/default.nix new file mode 100644 index 0000000..ecef03e --- /dev/null +++ b/users/sils/nixvim/maps/default.nix @@ -0,0 +1,20 @@ +{ + terminal = { + "<A-h>" = ''<C-\><C-N><C-w>h''; + "<A-j>" = ''<C-\><C-N><C-w>j''; + "<A-k>" = ''<C-\><C-N><C-w>k''; + "<A-l>" = ''<C-\><C-N><C-w>l''; + }; + normal = { + "<A-h>" = ''<C-\><C-N><C-w>h''; + "<A-j>" = ''<C-\><C-N><C-w>j''; + "<A-k>" = ''<C-\><C-N><C-w>k''; + "<A-l>" = ''<C-\><C-N><C-w>l''; + }; + insert = { + "<A-h>" = ''<Esc><C-w>h''; + "<A-j>" = ''<Esc><C-w>j''; + "<A-k>" = ''<Esc><C-w>k''; + "<A-l>" = ''<Esc><C-w>l''; + }; +} |