This commit is contained in:
gin
2026-05-25 10:55:43 +08:00
parent b17dec8e44
commit a751b6fb7b
6 changed files with 58 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
local keymap = vim.keymap.set
local opts = { noremap = true, silent = true }
keymap({ 'n', 'v' }, 'H', '0', opts)
keymap({ 'n', 'v' }, 'J', '5j', opts)
keymap({ 'n', 'v' }, 'K', '5k', opts)
keymap({ 'n', 'v' }, 'L', '$', opts)
keymap('n', 'n', 'nzz', opts)
keymap('n', 'N', 'Nzz', opts)
keymap('n', 's', '<cmd>w<cr>', opts)
keymap('n', '<space>nh', '<cmd>nohlsearch<cr>', opts)
keymap('n', '<space>sj', '<cmd>set splitbelow<cr><cmd>split<cr>', opts)
keymap('n', '<space>sl', '<cmd>set nosplitright<cr><cmd>vsplit<cr>', opts)
+40
View File
@@ -0,0 +1,40 @@
local opt = vim.opt
opt.tabstop = 2
opt.shiftwidth = 2
opt.softtabstop = 2
opt.scrolloff = 18
opt.encoding = 'utf-8'
opt.autoindent = true
opt.smartindent = true
opt.wrap = false
opt.number = true
opt.relativenumber = true
opt.wildmenu = true
opt.hlsearch = true
opt.incsearch = true
opt.ignorecase = true
opt.smartcase = true
opt.autochdir = true
opt.cursorline = true
opt.termguicolors = true
opt.splitbelow = true
opt.splitright = true
opt.expandtab = true
opt.visualbell = true
opt.showcmd = true
opt.autoread = true
opt.swapfile = false
opt.mouse = ''
opt.signcolumn = 'yes'
opt.shortmess = 'atI'
opt.updatetime = 100
opt.redrawtime = 1500
opt.timeoutlen = 500
-- folding
opt.foldenable = false
opt.foldlevel = 99