nvim: keymappings: Enable escape and arrow keys
Now that we use Planck EZ as our main keyboard with Colemak as the layout, allow use of escape and arrow keys. HJKL are not usable the same way as before.
This commit is contained in:
parent
fb1007b1b6
commit
88ed57fb8b
1 changed files with 2 additions and 16 deletions
|
@ -1,10 +1,6 @@
|
|||
local remap = vim.api.nvim_set_keymap
|
||||
|
||||
-- Remap escape keys to something usable on home row
|
||||
remap('i', 'jk', '<Esc>', { noremap = true })
|
||||
remap('c', 'jk', '<C-C>', { noremap = true })
|
||||
remap('i', '<Esc>', '<Nop>', { noremap = true })
|
||||
remap('c', '<Esc>', '<Nop>', { noremap = true })
|
||||
remap('c', '<Esc>', '<C-C>', { noremap = true })
|
||||
-- Use Q to execute default register.
|
||||
remap('n', 'Q', '<Nop>', { noremap = true })
|
||||
-- Save
|
||||
|
@ -72,7 +68,7 @@ remap('n', 'zmk', ':set foldmethod=marker<CR>', { noremap = true })
|
|||
remap('n', 'zms', ':set foldmethod=syntax<CR>', { noremap = true })
|
||||
|
||||
-- Key Bindings to help with terminal mode
|
||||
remap('t', 'jk', '<C-\\><C-n>', { noremap = true })
|
||||
remap('t', '<Esc>', '<C-\\><C-n>', { noremap = true })
|
||||
|
||||
-- Key bindings to move between window splits
|
||||
remap('n', '<Space>0', '0<C-w>w', { noremap = true })
|
||||
|
@ -86,16 +82,6 @@ remap('n', '<Space>7', '7<C-w>w', { noremap = true })
|
|||
remap('n', '<Space>8', '8<C-w>w', { noremap = true })
|
||||
remap('n', '<Space>9', '9<C-w>w', { noremap = true })
|
||||
|
||||
-- Disable Arrow Keys
|
||||
remap('i', '<Up>', '<NOP>', { noremap = true })
|
||||
remap('i', '<Down>', '<NOP>', { noremap = true })
|
||||
remap('i', '<Left>', '<NOP>', { noremap = true })
|
||||
remap('i', '<Right>', '<NOP>', { noremap = true })
|
||||
remap('n', '<Up>', '<NOP>', { noremap = true })
|
||||
remap('n', '<Down>', '<NOP>', { noremap = true })
|
||||
remap('n', '<Left>', '<NOP>', { noremap = true })
|
||||
remap('n', '<Right>', '<NOP>', { noremap = true })
|
||||
|
||||
-- Tag helpers
|
||||
remap('n', '<C-\\>', ':vsp <CR>:<C-u>tag <C-r><C-w><CR>', { noremap = true })
|
||||
remap('n', '<A-]>', ':sp <CR>:<C-u>tag <C-r><C-w><CR>', { noremap = true })
|
||||
|
|
Loading…
Reference in a new issue