aboutsummaryrefslogtreecommitdiff
path: root/lua/user/keys.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-09-04 23:17:23 +0200
committersrdusr <trevorgray@srdusr.com>2023-09-04 23:17:23 +0200
commit58098da6b912f1bd36d602cbf712ada7af7fd6fd (patch)
treec685daf375486bb544149c3fde531db5e204560f /lua/user/keys.lua
parentb606b2eac7b1942ca7a60dace432e829998758eb (diff)
downloaddotfiles-58098da6b912f1bd36d602cbf712ada7af7fd6fd.tar.gz
dotfiles-58098da6b912f1bd36d602cbf712ada7af7fd6fd.zip
Mapping '<A-h/j/k/l>' also works in terminal now
Diffstat (limited to 'lua/user/keys.lua')
-rw-r--r--lua/user/keys.lua16
1 files changed, 5 insertions, 11 deletions
diff --git a/lua/user/keys.lua b/lua/user/keys.lua
index 3305653..07a1b12 100644
--- a/lua/user/keys.lua
+++ b/lua/user/keys.lua
@@ -87,17 +87,11 @@ map('n', '<Leader><', ':vertical resize +5<CR>')
map('n', '<Leader>>', ':vertical resize -5<CR>')
map('n', '<Leader>=', '<C-w>=')
--- Map Alt+(h/j/k/l) in insert mode to move directional
-map('i', '<A-h>', '<left>')
-map('i', '<A-j>', '<down>')
-map('i', '<A-k>', '<up>')
-map('i', '<A-l>', '<right>')
-
--- Map Alt+(h/j/k/l) in command mode to move directional
-vim.api.nvim_set_keymap('c', '<A-h>', '<Left>', { noremap = true })
-vim.api.nvim_set_keymap('c', '<A-j>', '<Down>', { noremap = true })
-vim.api.nvim_set_keymap('c', '<A-k>', '<Up>', { noremap = true })
-vim.api.nvim_set_keymap('c', '<A-l>', '<Right>', { noremap = true })
+-- Map Alt+(h/j/k/l) in insert(include terminal/command) mode to move directional
+map({ 'i', 't', 'c' }, '<A-h>', '<left>')
+map({ 'i', 't', 'c' }, '<A-j>', '<down>')
+map({ 'i', 't', 'c' }, '<A-k>', '<up>')
+map({ 'i', 't', 'c' }, '<A-l>', '<right>')
-- Create tab, edit and move between them
map('n', '<C-T>n', ':tabnew<CR>')