首页 > 其他分享 >极简vim配置

极简vim配置

时间:2024-05-26 15:14:25浏览次数:17  
标签:Plug 极简 set auto 配置 vim let plug

成品



安装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

标签:Plug,极简,set,auto,配置,vim,let,plug
From: https://www.cnblogs.com/SBmiddleschoolstudent/p/18213696

相关文章

  • Debian/Linux网络配置全面指南:从静态IP到DNS设置
    在Debian/Linux上配置网络涉及多个步骤,包括设置静态IP地址、配置网关和DNS服务器等。以下是一个详细的教程,指导你如何在Debian/Linux系统上进行网络配置。1.编辑网络接口配置文件在Debian/Linux上,网络接口的配置文件通常位于/etc/network/interfaces。首先,以超级用户身份......
  • 几种常用的配置文件格式对比分析——ini、json、xml、toml、yaml
    配置文件用于存储软件程序的配置信息,以便程序能够根据这些信息进行自定义和调整。常用的配置文件格式包括INI、XML、JSON和YAML。下面对它们进行简单介绍,并分析各自的优缺点。1.INI文件格式简介:INI(Initialization)文件是一种简单的配置文件格式,通常由节(section)、键(key)和......
  • 极简vim配置
    安装vim`sudoaptinstallvim`安装plug-vim`curl-fLo~/.vim/autoload/plug.vim--create-dirshttps://raw.njuu.cf/junegunn/vim-plug/master/plug.vim`创建配置`vim.vimrc`粘贴配置setbs=2"Allowbackspacingovereverythingininsertm......
  • Redis 配置
    Redis的配置文件位于Redis安装目录下,文件名为 redis.conf(Windows名为redis.windows.conf)。 查看配置你可以通过 CONFIG 命令查看配置项。 语法CONFIGGET命令格式如下:CONFIGGETCONFIG_SETTING_NAME 实例-获取指定配置项redis127.0.0.1:6379>CON......
  • 【2024年电工杯A题】园区微电网风光储协调优化配置(思路、代码、论文)
    ......
  • 【2024年电工杯A题】园区微电网风光储协调优化配置(思路、代码、论文)
    ......
  • 网络模型-策略路由配置
            在实际网络应用中,策略路由也是一种重要的技术手段。尽管在考试并不注重策略路由,但是实际上应用较多建议考生除了掌握基本的静态路由协议IProute-static,动态路由协议RIP、还要掌握如何配置策略路由。策略路由的基本原理:根据ACL定义的不同数OSPF的基础配置外,据......
  • 重磅:Echart地图的配置项。
    Hi,大家好,今天分享一下Echarts地图的配置型,掌握了这些配置项就可以各种各样的效果。1.title:标题配置项,包括主标题和副标题的文本内容、样式、位置等。2.tooltip:提示框配置项,包括提示框的触发方式、显示内容、样式等。3.legend:图例配置项,包括图例的位置、布局、文本样式......
  • Windows Server安全配置
    密码安全设置密码最小长度为10管理工具-本地安全策略-帐户策略-密码策略-密码长度最小值密码使用期限设置密码最长使用期限为30天登录安全设置一分钟内仅允许6次登录失败的尝试,超过6次,登录帐号锁定1分钟禁用来宾用户来宾访问计算机或访问域的内置帐户设置为不......
  • DNS服务的部署与配置(1)
    一、DNS的定义1、域名系统(英文:DomainNameSystem,缩写:DNS)是互联网的一项服务。     它作为将域名和IP地址相互映射的一个分布式数据库,能够使人更方便地访问互联网。DNS使用UDP端口53。当前,对于每一级域名长度的限制是63个字符,域名总长度则不能超过253个字符。2、......