diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2023-06-06 20:41:43 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2023-06-06 20:41:43 +0000 |
commit | 10725de30d546577f87faedf30c8bc4355e880d5 (patch) | |
tree | d3311650a5cf829260881a69b05d0ced89e7f2d7 | |
parent | f770e0b87df633d48581d464dd88af4c0b3e8eb6 (diff) | |
download | dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar.gz dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar.bz2 dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar.lz dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar.xz dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.tar.zst dotfiles-10725de30d546577f87faedf30c8bc4355e880d5.zip |
Neovim: Add emacs-like bindings in insert mode
-rw-r--r-- | .config/nvim/lua/keybinds.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua index 5d94697..800eaab 100644 --- a/.config/nvim/lua/keybinds.lua +++ b/.config/nvim/lua/keybinds.lua @@ -13,6 +13,11 @@ vim.api.nvim_command("inoremap <A-j> <Esc>:m .+1<CR>==gi") vim.api.nvim_command("vnoremap <A-j> :m '>+1<CR>gv=gv") vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv") +vim.keymap.set("i", "<C-a>", "<Home>") +vim.keymap.set("i", "<C-e>", "<End>") +vim.keymap.set("i", "<A-f>", "<C-Right>") +vim.keymap.set("i", "<A-b>", "<C-Left>") + vim.keymap.set("n", "<Leader>n", nt_api.tree.toggle) vim.keymap.set("n", "<Leader><CR>", vim.lsp.buf.code_action) vim.keymap.set("n", "<Leader>K", vim.lsp.buf.hover) |