local function map(mode, lhs, rhs, opts) local options = {noremap = true} if opts then options = vim.tbl_extend("force", options, opts) end vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -- copy any selected text with pressing y map("", "c", '"+y') -- OPEN TERMINALS -- map("n", "", [[vnew term://bash ]], opt) -- open term over right map("n", "", [[ split term://bash | resize 10 ]], opt) -- open term bottom -- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) -- toggle line number map("n", "", [[ set nu! ]], opt)