1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

add lua map module and more mappings

This commit is contained in:
jdhao 2022-05-29 12:27:26 +08:00
parent 934ef7fb13
commit e3b15da059
2 changed files with 11 additions and 0 deletions

View File

@ -193,3 +193,6 @@ function! s:restore_cursor() abort
silent! normal `y
silent! delmarks y
endfunction
" for mappings defined in lua
lua require('custom-map')

8
lua/custom-map.lua Normal file
View File

@ -0,0 +1,8 @@
local keymap = vim.keymap
-- Go to the begining and end of current line in insert mode quickly
keymap.set('i', '<C-A>', '<HOME>')
keymap.set('i', '<C-E>', '<END>')
-- Delete the character to the right of the cursor
keymap.set('i', '<C-D>', '<DEL>')