init
This commit is contained in:
30
lua/mappings.lua
Normal file
30
lua/mappings.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- general mappings
|
||||
map("n", "<C-s>", "<cmd> w <CR>")
|
||||
map("i", "jk", "<ESC>")
|
||||
map("n", "<C-c>", "<cmd> %y+ <CR>") -- copy whole filecontent
|
||||
|
||||
-- nvimtree
|
||||
map("n", "<C-n>", "<cmd> NvimTreeToggle <CR>")
|
||||
map("n", "<C-h>", "<cmd> NvimTreeFocus <CR>")
|
||||
|
||||
-- telescope
|
||||
map("n", "<leader>ff", "<cmd> Telescope find_files <CR>")
|
||||
map("n", "<leader>fo", "<cmd> Telescope oldfiles <CR>")
|
||||
map("n", "<leader>fw", "<cmd> Telescope live_grep <CR>")
|
||||
map("n", "<leader>gt", "<cmd> Telescope git_status <CR>")
|
||||
|
||||
-- bufferline, cycle buffers
|
||||
map("n", "<Tab>", "<cmd> BufferLineCycleNext <CR>")
|
||||
map("n", "<S-Tab>", "<cmd> BufferLineCyclePrev <CR>")
|
||||
map("n", "<C-q>", "<cmd> bd <CR>")
|
||||
|
||||
-- comment.nvim
|
||||
map("n", "<leader>/", "gcc", { remap = true })
|
||||
map("v", "<leader>/", "gc", { remap = true })
|
||||
|
||||
-- format
|
||||
map("n", "<leader>fm", function()
|
||||
require("conform").format()
|
||||
end)
|
||||
Reference in New Issue
Block a user