mirror of
https://github.com/m1ngsama/chopsticks.git
synced 2025-12-24 10:51:22 +00:00
init
This commit is contained in:
commit
e1dde8a5d2
1 changed files with 28 additions and 0 deletions
28
init.lua
Normal file
28
init.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- m1ngsama's neovim config
|
||||
|
||||
-- 行号
|
||||
local set = vim.o
|
||||
set.number = true
|
||||
set.relativenumber = true
|
||||
|
||||
-- 剪贴板
|
||||
set.clipboard = "unnamed"
|
||||
|
||||
-- copy后高亮
|
||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||
pattern = { "*" },
|
||||
callback = function()
|
||||
vim.highlight.on_yank({
|
||||
timeout = 300,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- keybindings
|
||||
local opt = { noremap = true, silent = true }
|
||||
vim.keymap.set("n", "<C-l>", "<C-w>l", opt)
|
||||
vim.keymap.set("n", "<C-h>", "<C-w>h", opt)
|
||||
vim.keymap.set("n", "<C-j>", "<C-w>j", opt)
|
||||
vim.keymap.set("n", "<C-k>", "<C-w>k", opt)
|
||||
|
||||
|
||||
Loading…
Reference in a new issue