极简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
  • 8
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值