|
@@ -0,0 +1,27 @@
|
|
|
|
+
|
|
|
|
+--
|
|
|
|
+-- Keys remapping
|
|
|
|
+--
|
|
|
|
+
|
|
|
|
+vim.g.mapleader = " " -- Leader key
|
|
|
|
+
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<f1>', '<cmd>bprev<cr>') -- <F1> to switch to previous buffer
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<f2>', '<cmd>bnext<cr>') -- <F2> to switch to next buffer
|
|
|
|
+
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<f5>', '<cmd>source %<cr>') -- <F5> to reload current file
|
|
|
|
+
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<f6>', '<cmd>vsplit<cr>') -- <F6> to split window vertically
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<f7>', '<cmd>split<cr>') -- <F7> to split window horizontally
|
|
|
|
+
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<c-d>', '<cmd>bwipeout<cr>') -- <Ctrl-d> to close the current buffer
|
|
|
|
+
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<c-left>', '<cmd>wincmd h<cr>') -- <Ctrl-left> move to windows on left
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<c-Up>', '<cmd>wincmd k<cr>') -- <Ctrl-Up> move to windows on top
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<c-right>', '<cmd>wincmd l<cr>') -- <Ctrl-right> move to windows on right
|
|
|
|
+vim.keymap.set({'n', 'i', 'o'}, '<c-Down>', '<cmd>wincmd j<cr>') -- <Ctrl-Down> move to windows on bottom
|
|
|
|
+
|
|
|
|
+vim.keymap.set('v', '>', '>gv') -- Keep selection while indenting with '>'
|
|
|
|
+vim.keymap.set('v', '<tab>', '>gv') -- Keep selection while indenting with <Tab>
|
|
|
|
+vim.keymap.set('v', '<', '<gv') -- Keep selection while un-indenting with '<'
|
|
|
|
+vim.keymap.set('v', '<s-tab>', '<gv') -- Keep selection while un-indenting with <Shift-Tab>
|
|
|
|
+
|