" 编码 set encoding=utf-8 set fileencodings=utf-8,gb2312,gbk,gb18030,latin1 set fileformat=unix set fileformats=unix,dos " 缩进与格式 filetype indent on set autoindent set smarttab set cindent setshiftwidth=4 settabstop=4 set expandtab setsofttabstop=4 setbackspace=eol,start,indent
" 搜索 set hlsearch set incsearch set ignorecase set smartcase
-- Hint: use `:h <option>` to figure out the meaning if needed vim.opt.clipboard = 'unnamedplus'-- use system clipboard vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } vim.opt.mouse = 'a'-- allow the mouse to be used in Nvim
-- Tab vim.opt.tabstop = 4-- number of visual spaces per TAB vim.opt.softtabstop = 4-- number of spacesin tab when editing vim.opt.shiftwidth = 4-- insert 4 spaces on a tab vim.opt.expandtab = true-- tabs are spaces, mainly because of python
-- UI config vim.opt.number = true-- show absolute number vim.opt.relativenumber = true-- add numbers to each line on the left side vim.opt.cursorline = true-- highlight cursor line underneath the cursor horizontally vim.opt.splitbelow = true-- open new vertical split bottom vim.opt.splitright = true-- open new horizontal splits right -- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI vim.opt.showmode = false-- we are experienced, wo don't need the "-- INSERT --" mode hint
-- Searching vim.opt.incsearch = true-- search as characters are entered vim.opt.hlsearch = false-- do not highlight matches vim.opt.ignorecase = true-- ignore case in searches by default vim.opt.smartcase = true-- but make it case sensitive if an uppercase is entered
-- Hint: start visual mode with the same area as the previous area and the same mode vim.keymap.set('v', '<', '<gv', opts) vim.keymap.set('v', '>', '>gv', opts)