--一、配置文件--1.文件相关--将文件的编码格式统一设置为UTF-8vim.g.encoding="UTF-8"vim.o.fileencoding="UTF-8"--2.缩进--设置每个缩进级别使用的空格数 vim.opt.shiftwidth=2vim.opt.tabstop=2--自动缩进 vim.opt.ai=true--智能缩进 vim.opt.si=true--Neovim 会自动在新行添加空格或制表符以匹...
vim.o.shiftwidth=4vim.bo.shiftwidth=4--使用jk移动光标时,上下方保留8行 vim.o.scrolloff=8vim.o.sidescrolloff=8--设置自动折叠 vim.o.smartindent=true--历史命令最多保存1000条 vim.o.history=1000--显示空白字符 vim.o.list=true--样式 vim.o.background="dark"vim.o.termguicolors=truevim.opt....
在谈相对行号前,其实 Vim 另外一种行间跳转方式:基于相对位置,可使用如10k或10l向上向下快速跳转,是一种适合在屏幕范围快速跳转的方式。 但它缺点是,要数这个相对位置,如上图中,假设要从vim.o.shiftwidth = true跳转到vim.o.autoindent=true,可使用:13或者通过6l(向下跳转 6 行)实现,第二种方式快速计算相对...
送给命令fmt处理,然后用fmt返回的东西替换输出.) >> 右移当前段落一个移动宽度(shiftwidth) << 左移当前段落一个移动宽度(shiftwidth) > % 从当前到匹配小(中,大)括号之间的文本右移 <% 从当前到匹配小(中,大)括号之间的文本左移 (似乎漏了一个符号|, 移动到某一列---译注) a 在当前位置之后添加 A ...
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 --...
vim.o.shiftwidth = 4 -- 新行对齐当前行,tab转换为空格 vim.o.expandtab = true .expandtab = true vim.o.autoindent = true .autoindent = true vim.o.smartindent = true -- << >> 缩进时移动的长度 vim.o.shiftwidth = 4 .shiftwidth = 4 ...
vim.o.shiftwidth = 4 -- 新行对齐当前行,tab转换为空格 vim.o.expandtab = true vim.bo.expandtab = true vim.o.autoindent = true vim.bo.autoindent = true vim.o.smartindent = true -- << >> 缩进时移动的长度 vim.o.shiftwidth = 4 vim.bo.shiftwidth = 4 -- 使用jk移动光标时,上下方...
vim.bo.shiftwidth =4 -- 空格替代 tabvim.o.expandtab =true vim.bo.expandtab =true -- 新行对齐当前行 vim.o.autoindent =true vim.bo.autoindent =true vim.o.smartindent =true -- 搜索大小写不敏感,除非包含大写 vim.o.ignorecase =true ...
set shiftwidth=4 set tabstop=4 set softtabstop=4 set expandtab set smarttab set backspace=2 "退格键可以删除任何东西 "显示TAB字符为<+++ set list set list listchars=tab:<+ "映射常用操作 map [r :! python % <CR> map [o :! python -i % <CR> ...
vim.opt.fileformats = "unix,dos,mac" vim.opt.smartindent = true vim.opt.expandtab = true -- tab to spaces vim.opt.tabstop = 2 -- the width of a tab vim.opt.shiftwidth = 2 -- the width for indent vim.opt.foldenable = true vim.opt.foldmethod = "indent" -- folding by indent...