2024-03-20 20:48:32 -05:00
|
|
|
-- This file lists all the global keymaps
|
|
|
|
|
|
|
|
-- Change the leader and localleader
|
|
|
|
vim.g.mapleader = ','
|
|
|
|
vim.g.maplocalleader = ';'
|
|
|
|
|
|
|
|
|
|
|
|
-- Use ,dd for deleting without putting into buffer
|
|
|
|
vim.keymap.set({ 'v', 'n' }, '<leader>d', '"_d', { remap = false })
|
|
|
|
vim.keymap.set('n', '<leader>D', '"_D', { remap = false })
|
|
|
|
vim.keymap.set('n', '<leader>x', '"_x', { remap = false })
|
|
|
|
|
|
|
|
-- Insert a newline in normal mode by ,o
|
|
|
|
vim.keymap.set('n', '<leader>o', "o<Esc>k", { remap = false })
|
|
|
|
vim.keymap.set('n', '<leader>O', "O<Esc>j", { remap = false })
|
|
|
|
|
|
|
|
-- Use ,u for redo
|
|
|
|
vim.keymap.set('n', '<leader>u', "<c-r>", { remap = false })
|
|
|
|
|
2024-03-21 17:29:10 -05:00
|
|
|
|
|
|
|
-- Find files using fzf by ,f
|
|
|
|
vim.keymap.set('n', '<leader>f', ":Files<cr>", { remap = false })
|
|
|
|
|
2024-03-20 20:48:32 -05:00
|
|
|
-- Move around buffers using ,j and ,k
|
|
|
|
vim.keymap.set('n', '<leader>k', ":bnext<cr>", { remap = false })
|
|
|
|
vim.keymap.set('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
|
|
|
|