zsh vi-mode is ok. multiline command editing only possible once it hits history, though

pull/3/head
pegasust 2022-12-29 20:19:02 -07:00
parent 563c7e8da5
commit 93ef9d9a8b
3 changed files with 38 additions and 4 deletions

View File

@ -1,4 +1,7 @@
{ {
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.diagnostics.globals": [
"vim",
],
"Lua.workspace.checkThirdParty": false "Lua.workspace.checkThirdParty": false
} }

View File

@ -94,6 +94,25 @@ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
endif endif
]]) ]])
-- special terminals, place them at 4..=7 for ergonomics
vim.api.nvim_create_autocmd({"VimEnter"}, {
callback = function()
-- term:ctl at 4
require('harpoon.term').gotoTerminal(4)
vim.cmd([[:exe ":file term:ctl"]])
-- term:dev at 5
require('harpoon.term').gotoTerminal(5)
vim.cmd([[:exe ":file term:dev"]])
-- term:repl at 7
require('harpoon.term').gotoTerminal(7)
vim.cmd([[:exe ":file term:repl"]])
-- term:repl at 6
require('harpoon.term').gotoTerminal(6)
vim.cmd([[:exe ":file term:repl2"]])
end
})
vim.cmd([[ vim.cmd([[
set ignorecase set ignorecase
set smartcase set smartcase
@ -130,8 +149,8 @@ vim.g.maplocalleader = ','
-- basic keymaps -- basic keymaps
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) -- since we're using space for leader vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) -- since we're using space for leader
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>)') -- make :terminal escape out vim.keymap.set('t', '<C-\\><Esc>', '<C-\\><C-n>)') -- make :terminal escape out
vim.keymap.set({ 'n', 'i', 'v' }, '<c-l>', '<Cmd>:mode<Cr>') -- redraw on every mode vim.keymap.set({ 'n', 'i', 'v' }, '<c-l>', '<Cmd>mode<Cr>', {desc = ""}) -- redraw on every mode
-- diagnostics (errors/warnings to be shown) -- diagnostics (errors/warnings to be shown)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)

View File

@ -81,7 +81,19 @@ in
}; };
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ "git" "sudo" "command-not-found" "gitignore" "ripgrep" "rust" ]; plugins = [
"git" # git command aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git#aliases
"sudo" # double-escape to prepend sudo
"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 :)
];
};
sessionVariables = {
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE = true;
VI_MODE_SET_CURSOR = true;
}; };
initExtra = cfg.shellInitExtra or ""; initExtra = cfg.shellInitExtra or "";
}; };