keybindings
This commit is contained in:
16
lua/core/keymaps.lua
Normal file
16
lua/core/keymaps.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- ~/.config/nvim/lua/core/keymaps.lua
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
local map = vim.keymap.set
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
map("n", "<leader>s", "<cmd>w<cr>", vim.tbl_extend("force", opts, { desc = "Save file" }))
|
||||
map("n", "<leader>q", "<cmd>confirm q<cr>", vim.tbl_extend("force", opts, { desc = "Quit window" }))
|
||||
map("n", "<leader>h", "<cmd>nohlsearch<cr>", vim.tbl_extend("force", opts, { desc = "Clear highlights" }))
|
||||
|
||||
map("n", "<C-h>", "<C-w>h", opts)
|
||||
map("n", "<C-j>", "<C-w>j", opts)
|
||||
map("n", "<C-k>", "<C-w>k", opts)
|
||||
map("n", "<C-l>", "<C-w>l", opts)
|
||||
|
||||
18
lua/core/options.lua
Normal file
18
lua/core/options.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- ~/.config/nvim/lua/core/options.lua
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.cursorline = true
|
||||
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.hlsearch = false
|
||||
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.updatetime = 200
|
||||
vim.opt.timeoutlen = 400
|
||||
|
||||
Reference in New Issue
Block a user