From b82fee49de96971e353be229e386e9b315c9cc6b Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sun, 24 Dec 2023 00:02:02 +0100 Subject: [PATCH] Add some of my mappings - TODO: check some redundancies --- init.lua | 1 + lua/mappings.lua | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 lua/mappings.lua 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})