安装plug-vim
cd
git clone https:
mk ~/.vim/autoload -p
cd ~/.vim/autoload
cp ~/vim-plug/plug.vim ./
syntax on
set nu
set norelativenumber
set tabstop=2
set shiftwidth=2
set matchtime=2
set smartindent
set cindent
set autoindent
set ruler
set cursorline
set showmatch
set showcmd
set hlsearch
set incsearch
set ignorecase
set smartcase
set wildmenu
let mapleader=" "
noremap <LEADER><CR> :noh<CR>
noremap n h
map m <nop>
map s <nop>
map S :w<CR>
map Q :q<CR>
map msl :set splitright<CR>:vsplit<CR>
map msh :set nosplitright<CR>:vsplit<CR>
map msk :set nosplitbelow<CR>:split<CR>
map msj :set splitbelow<CR>:split<CR>
map <LEADER>l <C-w>l
map <LEADER>h <C-w>h
map <LEADER>k <C-w>k
map <LEADER>j <C-w>j
map <up> :res +1<CR>
map <down> :res -1<CR>
map <left> :vertical resize-1<CR>
map <right> :vertical resize+1<CR>
map mk :tabn<CR>
map mj :tabp<CR>
map ml :tablast<CR>
map mh :tabfirst<CR>
inoremap ( ()<Esc>i
inoremap [ []<Esc>i
inoremap { {}<Esc>i<Enter><Esc>O
inoremap " ""<Esc>i
inoremap ' ''<Esc>i
inoremap <C-b> <Backspace>
inoremap <C-g> <Down><Right>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-h> <Left>
inoremap <C-l> <Right>
func SkipPair()
if getline('.')[col('.') - 1] == ')' || getline('.')[col('.') - 1] == ']' || getline('.')[col('.') - 1] == '"' || getline('.')[col('.') - 1] == "'" || getline('.')[col('.') - 1] == '}'
return "\<ESC>la"
else
return "\t"
endif
endfunc
inoremap <TAB> <c-r>=SkipPair()<CR>
call plug#begin('~/.vim/plugged')
call plug#end()
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现