nvim-config/after/plugin/keys.lua

22 lines
1.0 KiB
Lua

-- This file sets the fzf and side tree
vim.keymap.set("n", " ", "<Nop>", { silent = true, remap = false })
vim.g.mapleader = " "
vim.g.maplocalleader = " "
local opts = { noremap=true }
vim.keymap.set('n', '<leader>f', function () vim.cmd('Telescope find_files') end, { remap = true })
vim.keymap.set('n', '<leader>/', function () vim.cmd('Telescope live_grep') end, { remap = true })
vim.keymap.set('n', '<leader>b', function () vim.cmd('Telescope buffers') end, { remap = true })
vim.keymap.set('n', 'ge', 'G0', { remap = true })
vim.keymap.set('n', 'gh', '0', { remap = true })
vim.keymap.set('n', 'gl', '$', { remap = true })
vim.keymap.set('v', '<leader>c', function () vim.cmd('\'<,\'>Commentary') end, { noremap = true, silent = true })
vim.keymap.set('n', '<leader>c', function () vim.cmd('Commentary') end, { noremap = true, silent = true })
vim.keymap.set('v', '<leader>gg', function () vim.cmd('Neogit') end, { noremap = true, silent = true })
vim.keymap.set("n", "<C-F>", "<cmd>NvimTreeToggle<CR>", { silent = true })