change to zsh-vi-mode; in vim terminal emu, just use <C-[> lol

pull/3/head
pegasust 2022-12-30 02:21:59 -07:00
parent b84ad23b42
commit 4b42202ede
3 changed files with 13 additions and 8 deletions

View File

@ -149,7 +149,7 @@ vim.g.maplocalleader = ','
-- basic keymaps
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) -- since we're using space for leader
vim.keymap.set('t', '<C-\\><Esc>', '<C-\\><C-n>)') -- make :terminal escape out
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>)') -- make :terminal escape out
vim.keymap.set({ 'n', 'i', 'v' }, '<c-l>', '<Cmd>mode<Cr>', {desc = ""}) -- redraw on every mode
-- diagnostics (errors/warnings to be shown)

View File

@ -3,6 +3,7 @@
{ config
, proj_root
, myLib
, pkgs
, ...
}:
let cfg = config.base.shells;
@ -83,19 +84,23 @@ in
enable = true;
plugins = [
"git" # git command aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git#aliases
"sudo" # double-escape to prepend sudo
# "sudo" # double-escape to prepend sudo # UPDATE: just use vi-mode lol
"command-not-found" # suggests which package to install; does not support nixos (we have solution already)
"gitignore" # `gi list` -> `gi java >>.gitignore`
"ripgrep" # adds completion for `rg`
"rust" # compe for rustc/cargo
"vi-mode" # edit promps with vi motions :)
# "vi-mode" # edit promps with vi motions :)
];
};
sessionVariables = {
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE = true;
VI_MODE_SET_CURSOR = true;
# VI_MODE_RESET_PROMPT_ON_MODE_CHANGE = true;
# VI_MODE_SET_CURSOR = true;
# ZVM_VI_ESCAPE_BINDKEY = "";
};
initExtra = cfg.shellInitExtra or "";
initExtra = (cfg.shellInitExtra or "") + ''
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
'';
};
};
}

View File

@ -90,11 +90,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-KP+2qdZlhmRkrafuuEofg7YnNdVmGV95ipvpuqmJneI=",
"path": "/nix/store/843qksh68zpgs3bx048k0h589ax1v90z-source/out-of-tree/nixGL",
"path": "/nix/store/lla48fa225m9f1aisby3zrh860j781gy-source/out-of-tree/nixGL",
"type": "path"
},
"original": {
"path": "/nix/store/843qksh68zpgs3bx048k0h589ax1v90z-source/out-of-tree/nixGL",
"path": "/nix/store/lla48fa225m9f1aisby3zrh860j781gy-source/out-of-tree/nixGL",
"type": "path"
}
},