2024-01-16 20:16:19 +08:00
|
|
|
local opt = { noremap = true }
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-04-29 22:30:25 +08:00
|
|
|
-- base
|
2023-01-24 22:27:07 +08:00
|
|
|
G.map({
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<leader>nh', ':nohlsearch<CR>', opt },
|
|
|
|
{ 'n', '<leader>rp', ':%s/', opt },
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'v', 'L', '$', opt },
|
|
|
|
{ 'v', 'H', '^', opt },
|
|
|
|
{ 'n', 'L', '$', opt },
|
|
|
|
{ 'n', 'H', '^', opt },
|
|
|
|
{ 'v', '>', '>gv', opt },
|
|
|
|
{ 'v', '<', '<gv', opt },
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '>', '>>', opt },
|
|
|
|
{ 'n', '<', '<<', opt },
|
|
|
|
{ 'n', '?', ':set hlsearch<CR>?', opt },
|
|
|
|
{ 'n', '/', ':set hlsearch<CR>/', opt },
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<A-l>', ':tabn<CR>', opt },
|
|
|
|
{ 'n', '<A-h>', ':tabp<CR>', opt },
|
2023-01-19 20:33:35 +08:00
|
|
|
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<c-j>', '<c-w>j', opt },
|
|
|
|
{ 'n', '<c-h>', '<c-w>h', opt },
|
|
|
|
{ 'n', '<c-k>', '<c-w>k', opt },
|
|
|
|
{ 'n', '<c-l>', '<c-w>l', opt },
|
2023-05-12 11:20:06 +08:00
|
|
|
|
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<c-c>', ':q<CR>', opt },
|
|
|
|
{ 'n', '<c-S>', ':w !sudo tee %<CR>', opt },
|
|
|
|
{ 'n', '<c-q>', ':q!<CR>', opt },
|
2024-02-22 21:21:39 +08:00
|
|
|
{ 'v', '<cs-y>', '"+y', opt },
|
|
|
|
|
2023-01-19 18:14:43 +08:00
|
|
|
|
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<leader>y', 'ggyG', opt },
|
|
|
|
{ 'n', '<leader>p', 'ggpG', opt },
|
|
|
|
{ 'n', '<leader>v', 'ggVG', opt },
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2024-01-16 20:16:19 +08:00
|
|
|
{ 'n', '<up>', ':res -5<CR>', opt },
|
|
|
|
{ 'n', '<down>', ':res +5<CR>', opt },
|
|
|
|
{ 'n', '<left>', ':vertical resize -5<CR>', opt },
|
|
|
|
{ 'n', '<right>', ':vertical resize +5<CR>', opt },
|
2023-05-12 11:20:06 +08:00
|
|
|
|
2023-02-11 14:31:48 +08:00
|
|
|
})
|