diff --git a/init.lua b/init.lua index 7f02508..98527e6 100644 --- a/init.lua +++ b/init.lua @@ -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 diff --git a/lua/mappings.lua b/lua/mappings.lua new file mode 100644 index 0000000..a76f5c1 --- /dev/null +++ b/lua/mappings.lua @@ -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", [""] = ":tabnew", +} +for key, binding in pairs(map_list) do + vim.api.nvim_set_keymap("n", key, binding .. "", {noremap = true, silent = true}) +end + +-- vim.api.nvim_set_keymap("n", "y", '"+y', {noremap = true, silent = true}) +-- vim.api.nvim_set_keymap("v", "y", '"+y', {noremap = true, silent = true}) +-- vim.api.nvim_set_keymap("n", "pp", '"+p', {noremap = true, silent = true}) +-- vim.api.nvim_set_keymap("v", "pp", '"+p', {noremap = true, silent = true})