local map = vim.api.nvim_set_keymap map('n', 'y', '"+y', {noremap = true}) map('n', 'p', '"+p', {noremap = true}) map('n', 'd', '"+d', {noremap = true}) map('v', 'y', '"+y', {noremap = true}) map('v', 'p', '"+p', {noremap = true}) map('v', 'd', '"+d', {noremap = true}) map('n', 'rp',':%s/',{noremap = true}) map('n', 'L', '$', {noremap = true}) map('n', 'H', '^', {noremap = true}) map('n', '>', '>>', {noremap = true}) map('n', '<', '<<', {noremap = true}) map('n', 'Q', ':q!', {noremap = true}) map('n', '?', 'set hlsearch?', {noremap = true}) map('n', '/', 'set hlsearch/', {noremap = true}) map('n', '', '5j', {noremap = true}) map('n', '', '5k', {noremap = true}) map('n', '', ':tabn', {noremap = true}) map('n', '', ':tabp', {noremap = true}) map('n', '', 'j', {noremap = true}) map('n', '', 'h', {noremap = true}) map('n', '', 'k', {noremap = true}) map('n', '', 'l', {noremap = true}) map('n', '', ':wq', {noremap = true}) map('n', '', ':nohlsearch', {noremap = true}) map('n', 'y', 'ggyG', {noremap = true}) map('n', 'p', 'ggpG', {noremap = true}) map('n', 'v', 'ggVG', {noremap = true}) map('n', '', ':res -5', {noremap = true}) map('n', '', ':res +5', {noremap = true}) map('n', '', ':vertical resize -5', {noremap = true}) map('n', '', ':vertical resize +5', {noremap = true}) -- 快速注释 map('n', '/', 'c', {noremap = true}) -- easymotion map('v', 'f', '(easymotion-bd-f)', {}) map('n', 'f', '(easymotion-overwin-f)', {}) map('n', 's', '(easymotion-overwin-f2)',{}) -- lazygit map('n', 'g', ':w:LazyGit', {}) -- coc.nvim map("n", "[g", "(coc-diagnostic-prev)", {silent = true}) map("n", "]g", "(coc-diagnostic-next)", {silent = true}) map("n", "gd", "(coc-definition)", {silent = true}) map("n", "gy", "(coc-type-definition)", {silent = true}) map("n", "gi", "(coc-implementation)", {silent = true}) map("n", "gr", "(coc-references)", {silent = true}) map("n", "rn", "(coc-rename)", {silent = true}) map("x", "i", "(coc-format-selected)", {silent = true}) map("n", "i", "(coc-format-selected)", {silent = true}) map("n", "", ":CocCommand explorer", {silent = true}) --EasyAlign map("v", "ga", ":EasyAlign", {silent = true})