Add some of my mappings

- TODO: check some redundancies
This commit is contained in:
Fabrice Mouhartem 2023-12-24 00:02:02 +01:00
parent 3aca44bf20
commit b82fee49de
2 changed files with 14 additions and 0 deletions

View File

@ -622,5 +622,6 @@ cmp.setup {
-- Personnalisation
require('bepo')
require('mappings')
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

13
lua/mappings.lua Normal file
View File

@ -0,0 +1,13 @@
local map_list = {
["w|"] = ":vsplit", ["w-"] = ":split", -- w| / w- pour créer des splits verticaux et horizontaux
["gi"] = ":bprevious", ["ge"] = ":bnext",
["W"] = ":w", ["<C-t>"] = ":tabnew",
}
for key, binding in pairs(map_list) do
vim.api.nvim_set_keymap("n", key, binding .. "<CR>", {noremap = true, silent = true})
end
-- vim.api.nvim_set_keymap("n", "<Leader>y", '"+y', {noremap = true, silent = true})
-- vim.api.nvim_set_keymap("v", "<Leader>y", '"+y', {noremap = true, silent = true})
-- vim.api.nvim_set_keymap("n", "<Leader>pp", '"+p', {noremap = true, silent = true})
-- vim.api.nvim_set_keymap("v", "<Leader>pp", '"+p', {noremap = true, silent = true})