2023-01-24 22:27:07 +08:00
|
|
|
local G,opt = require("G"), {noremap = true}
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
G.map({
|
|
|
|
{'n', '<leader>y', '"+y', opt},
|
|
|
|
{'n', '<leader>p', '"+p', opt},
|
|
|
|
{'n', '<leader>d', '"+d', opt},
|
2023-01-22 17:20:38 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
{'v', '<leader>y', '"+y', opt},
|
|
|
|
{'v', '<leader>p', '"+p', opt},
|
|
|
|
{'v', '<leader>d', '"+d', opt},
|
2023-01-22 17:20:38 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
{'n', '<leader>nh', ':nohlsearch<CR>', opt},
|
|
|
|
{'n', '<leader>rp',':%s/',opt},
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
{'v', 'L', '$', opt},
|
|
|
|
{'v', 'H', '^', opt},
|
|
|
|
{'n', 'L', '$', opt},
|
|
|
|
{'n', 'H', '^', opt},
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
{'n', '>', '>>', opt},
|
|
|
|
{'n', '<', '<<', opt},
|
|
|
|
{'n', 'Q', ':q!<CR>', opt},
|
|
|
|
{'n', '?', ':set hlsearch<CR>?', opt},
|
|
|
|
{'n', '/', ':set hlsearch<CR>/', opt},
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-01-24 22:27:07 +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
|
|
|
|
2023-01-24 22:27:07 +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},
|
|
|
|
{'n', '<c-c>', ':wq<CR>', opt},
|
2023-01-19 18:14:43 +08:00
|
|
|
|
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
{'n', '<leader><leader>y', 'ggyG', opt},
|
|
|
|
{'n', '<leader><leader>p', 'ggpG', opt},
|
|
|
|
{'n', '<leader><leader>v', 'ggVG', opt},
|
2023-01-19 18:14:43 +08:00
|
|
|
|
2023-01-24 22:27:07 +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-01-22 20:20:54 +08:00
|
|
|
|
2023-01-19 20:33:35 +08:00
|
|
|
|
|
|
|
-- lazygit
|
2023-01-24 22:27:07 +08:00
|
|
|
{'n', '<leader>g', ':w<CR>:LazyGit<CR>', {}},
|
2023-01-19 20:33:35 +08:00
|
|
|
|
|
|
|
--EasyAlign
|
2023-01-24 22:27:07 +08:00
|
|
|
{"v", "ga", ":EasyAlign<CR>", {silent = true}},
|
2023-01-19 20:33:35 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
})
|
2023-01-19 20:33:35 +08:00
|
|
|
|
2023-01-24 22:27:07 +08:00
|
|
|
G.map({
|
|
|
|
-- easymotion
|
|
|
|
{'v', '<leader>f', '<Plug>(easymotion-bd-f)', {}},
|
|
|
|
{'n', '<leader>f', '<Plug>(easymotion-overwin-f)', {}},
|
|
|
|
{'n', 's', '<Plug>(easymotion-overwin-f2)',{}},
|
|
|
|
})
|
2023-01-19 20:33:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-19 18:14:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|