Hi, I'm Djd

I'm learning Linux and Termux and i like Photography

雨过天晴

Hi, I'm Djd

I'm learning Linux and Termux and i like Photography

vim添加美化样式插件

1 minutes
April 18, 2024

本文的基础目的是配置一个好用的vim可以替代普通的文本编辑器,最终目的是可以在vim流畅开发

安装vim-plug(插件管理工具)

安装方式:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

目前为止的vimrc配置文件

let mapleader = ','
set number  			" 显示行号
set incsearch           " 实时开启搜索高亮
set hlsearch			" 搜索结果高亮
set autoindent			" 自动缩进
set smartindent			" 智能缩进
set tabstop=4			" 设置tab制表符号所占宽度为4
set softtabstop=4		" 设置按tab时缩进宽度为4
set shiftwidth=4		" 设置自动缩进宽度为4
set expandtab			" 缩进时将tab制表服转为空格
set smartcase           " 开启智能大小写查找
set encoding=utf-8      " Use UTF-8.
set showcmd             " Display incomplete commands.
set clipboard=unnamedplus " 开启系统剪切板
set cursorline          " 高亮当前行
set ignorecase          " 设置忽略大小写
set smartcase           " 设置智能大小写
set ruler               " 设置显示当前位置
" set autoread
filetype on			" 开启文件类型检测
filetype plugin indent on  " 开启文件类型插件检测
syntax on 			" 开启语法高亮

" 插件管理
call plug#begin('~/.vim/plugged')

" style start
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

Plug 'mhinz/vim-startify'

Plug 'morhetz/gruvbox'
" style end

" markdown start
Plug 'suan/vim-instant-markdown'
Plug 'tpope/vim-markdown'
" markdown end

" syntax start
" 语法补全插件
Plug 'valloric/youcompleteme'
" syntax end

" code start
Plug 'yggdroot/indentline'
Plug 'pangloss/vim-javascript'
" code end
call plug#end()

" 设置主题
"set background=dark
"let g:gruvbox_italic=1
"colorscheme gruvbox

" vim-instant-markdown
let g:instant_markdown_allow_unsafe_content = 1
let g:instant_markdown_autoscroll = 0 " 自动滚动到输入位置

" tpope/vim-markdown
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh','javascript','css','java','c']
let g:markdown_minlines = 100

" airline
let g:airline#extensions#tabline#enabled = 1                " 设置允许修改默认tab样式
let g:airline#extensions#tabline#formatter = 'jsformatter'  " 设置默认tab栏样式

" airline-theme
"let g:airline_theme='solarized'
let g:airline_theme='angr'              " 好像还是比较喜欢这个颜色