极简vim配置
成品
安装vim
sudo apt install vim
安装plug-vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.njuu.cf/junegunn/vim-plug/master/plug.vim
创建配置
vim .vimrc
粘贴配置
set nocompatible " Use Vim defaults (much better!) set bs=2 " Allow backspacing over everything in insert mode set ai " Always set auto-indenting on set history=50 " keep 50 lines of command history set ruler " Show the cursor position all the time " Don't use Ex mode, use Q for formatting map Q gq " When doing tab completion, give the following files lower priority. set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo set nomodeline syntax on autocmd BufRead APKBUILD set filetype=sh set bs=2 " Allow backspacing over everything in insert mode set ai " Always set auto-indenting on set history=50 " keep 50 lines of command history set ruler " Show the cursor position all the time " Don't use Ex mode, use Q for formatting map Q gq " When doing tab completion, give the following files lower priority. set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo set nomodeline syntax on autocmd BufRead APKBUILD set filetype=sh au GUIEnter * call libcallnr("vimtweak.dll", "SetAlpha", 234) set spell set nu set tabstop "tab 长度设置为 4Plug 'godlygeek/tabular' set nobackup "覆盖文件时不备份 set cursorline "突出显示当前行 set ruler "在右下角显示光标位置的状态行 set autoindent "自动缩进 let g:tokyonight_transparent_background = 1 call plug#begin('~/.vim/plugged') "该路径可以自己指定 "元神,启动! Plug 'mhinz/vim-startify' "文件树 Plug 'preservim/NERDTree' "自动䃼全 Plug 'skywind3000/vim-auto-popmenu' Plug 'skywind3000/vim-dict' "忘了 ```plaintext Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'yggdroot/indentline' Plug 'w0ng/vim-hybrid' Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' Plug 'yggdroot/indentlinee' "coc Plug 'scrooloose/syntastic' "主题 Plug 'ghifarit53/tokyonight-vim' Plug 'morhetz/gruvbox' Plug 'joshdick/onedark.vim' "括号补全 Plug 'jiangmiao/auto-pairs' Plug 'luochen1990/rainbow' "ddc Plug 'dense-analysis/ale' call plug#end() " enable this plugin for filetypes, '*' for all files. let g:apc_enable_ft = {'text':1, 'markdown':1, 'php':1,'c':1,'python':1} "source for dictionary, current or other loaded buffers, see ':help cpt' set cpt=.,k,w,b "don't select the first item. set completeopt=menu,menuone,noselect " suppress annoy messages. set shortmess+=c map <C-c> :NERDTreeToggle<CR> let g:rainbow_active = 1 set termguicolors autocmd vimenter * nested colorscheme gruvbox set bg=dark "========================================= " Startify 设置 "========================================= let g:startify_custom_header = [ \ '███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗', \ '████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║', \ '██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║', \ '██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║', \ '██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║', \ '╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝', \] let g:syntastic_always_populate_loc_list =1 let g:syntastic_check_on_open =1 let g:syntastic_auto_jump =1 set nocompatible filetype plugin indent on map <C-i> :w<CR>:!python3 %<CR> filetype plugin indent on set autoindent set smartindent let g:airline_powerline_fonts=1
本文作者:SB中学生
本文链接:https://www.cnblogs.com/SBmiddleschoolstudent/p/18213696
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步