diff options
-rw-r--r-- | .config/nvim/init.lua | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index e57dd51..804cee3 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -30,6 +30,11 @@ local mapnl = function(lhs, rhs, opts) end -- [[ keybindings ]] +-- close and bd +map("n", "<C-x>", ":bd<CR>") +map("t", "<C-x>", "<C-\\><C-n>:bd!<CR>") +map("n", "<C-s>", ":close<CR>") +map("t", "<C-s>", "<C-\\><C-n>") -- splits map("n", "<C-h>", "<C-w>h") map("n", "<C-j>", "<C-w>j") @@ -43,11 +48,15 @@ map("t", "<C-l>", "<C-\\><C-n><C-w>l") map("n", "<leader>t", ":vsplit<CR>:terminal<CR>i") map("t", "<leader>t", "<C-\\><C-n>:q<CR>") -- buffer -mapnl("h", ":bprevious<CR>") -mapnl("l", ":bNext<CR>") +map("t", "<leader>j", "<C-\\><C-n>:bprevious<CR>") +map("t", "<leader>k", "<C-\\><C-n>:bNext<CR>") +mapnl("j", ":bprevious<CR>") +mapnl("k", ":bNext<CR>") -- tabs -mapnl("j", ":tabprevious<CR>") -mapnl("k", ":tabNext<CR>") +map("t", "<leader>h", "<C-\\><C-n>:tabprevious<CR>") +map("t", "<leader>l", "<C-\\><C-n>:tabNext<CR>") +mapnl("h", ":tabprevious<CR>") +mapnl("l", ":tabNext<CR>") -- files mapnl("e", ":Lex<CR>") -- column hint |