vim插件及配置

"=============================================================================
" init.vim --- Entry file for neovim
" Copyright (c) 2016-2019 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================

"execute 'source' fnamemodify(expand('<sfile>'), ':h').'/config/main.vim'

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'


"主题插件
Plug 'altercation/vim-colors-solarized'
Plug 'jnurmine/Zenburn'
Plug 'flazz/vim-colorschemes'
Plug 'liuchengxu/space-vim-dark'


"语法高亮插件
Plug 'sheerun/vim-polyglot'

"语法高亮插件的依赖语言插件
Plug 'GutenYe/json5.vim'
Plug 'othree/html5.vim'
" plug 'pangloss/vim-javascript'
" plug 'aliev/vim-compiler-python'
" plug 'Vimjas/vim-python-pep8-indent'
" plug 'vim-python/python-syntax'



"启动界面
Plug 'mhinz/vim-startify'


"模糊匹配插件
Plug 'easymotion/vim-easymotion'


"目录树插件
Plug 'preservim/nerdtree'

"airline插件
Plug 'vim-airline/vim-airline'


"python-mode插件
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }


"python语法插件
Plug 'hdima/python-syntax'


"python依赖插件
Plug 'davidhalter/jedi-vim'



"markdown预览插件
function! BuildComposer(info)
  if a:info.status != 'unchanged' || a:info.force
    if has('nvim')
      !cargo build --release --locked
    else
      !cargo build --release --locked --no-default-features --features json-rpc
    endif
  endif
endfunction

Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }



"前端Emmet插件
Plug 'mattn/emmet-vim'


"快速对齐补全符号插件
Plug 'anyakichi/vim-surround'


"代码自动补全插件
if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1


"deoplete使用中python自动补全依赖插件
Plug 'deoplete-plugins/deoplete-jedi'


"快速查找文件插件
Plug 'kien/ctrlp.vim'


"查找和替换文件内容
Plug 'brooth/far.vim'
"用法
":Far foo bar **/*.py
":Fardo


"多行同时操作的插件
Plug 'terryma/vim-multiple-cursors'


"模糊搜索
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'


"Json配置文件
Plug 'elzr/vim-json'



"Json-formatter插件
Plug 'callumlocke/json-formatter'


"js-beautify插件
Plug 'beautify-web/js-beautify'
Plug 'maksimr/vim-jsbeautify'


"js formatter插件
Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] }
Plug 'mxw/vim-jsx', { 'for': ['javascript', 'javascript.jsx'] }

"tagbar插件
Plug 'majutsushi/tagbar'


"静态检查插件

Plug 'w0rp/ale'


"格式化插件
Plug 'sbdchd/neoformat'


"css颜色展示插件
Plug 'ap/vim-css-color'


"快速注释插件
Plug 'tpope/vim-commentary'


"微信小程序插件
Plug 'chemzqm/wxapp.vim'

"xml插件
Plug 'othree/xml.vim'



"缩进线插件
Plug 'Yggdroot/indentLine'


call plug#end()


"设置主题
colorscheme Atelier_CaveDark



"字体
set guifont=Monospace\ 14



"tagbar插件配置
nmap <F8> :TagbarToggle<CR>



"检测文件的类型     
filetype on  

"记录历史的条数
"set history=1000                  



"设置tab
set tabstop=4       " Tab键替换的空格长度,默认8
set softtabstop=4   " 退格键退回缩进空格的长度
set shiftwidth=4    " 表示每一级缩进的长度
set expandtab       " 设置缩进用空格来表示
set autoindent      " 设置自动缩进


"设置自动缩进
set autoindent 


"缩进线设置
" let g:indentLine_setColors = 0
" let g:indentLine_char_list = ['|', '¦', '┆', '┊']
" let g:indentLine_color_term = 239
" let g:indentLine_bgcolor_term = 202
" let g:indentLine_bgcolor_gui = '#50fc7b'



"设置行号
set number


"easy motion插件配置
nmap ss <Plug>(easymotion-s2)


"多行同时操作的插件配置
" Multip Cursor
" Default key mapping

let g:multi_cursor_next_key='<C-n>'

let g:multi_cursor_prev_key='<C-p>'

let g:multi_cursor_skip_key='<C-x>'

let g:multi_cursor_quit_key='<Esc>'


"自动补全插件deoplete配置
let g:deoplete#enable_at_startup = 1
set completeopt-=preview


"neoformat格式化插件配置
let g:neoformat_enabled_python = ['autopep8', 'yapf', 'docformatter']



"json插件配置
augroup json_autocmd
  autocmd!
  autocmd FileType json set autoindent
  autocmd FileType json set formatoptions=tcq2l
  autocmd FileType json set textwidth=78 shiftwidth=2
  autocmd FileType json set softtabstop=2 tabstop=8
  autocmd FileType json set expandtab
  autocmd FileType json set foldmethod=syntax
augroup END






"微信小程序配置
let g:user_emmet_settings = {
  \ 'wxss': {
  \   'extends': 'css',
  \ },
  \ 'wxml': {
  \   'extends': 'html',
  \   'aliases': {
  \     'div': 'view',
  \     'span': 'text',
  \   },
  \  'default_attributes': {
  \     'block': [{'wx:for-items': '{{list}}','wx:for-item': '{{item}}'}],
  \     'navigator': [{'url': '', 'redirect': 'false'}],
  \     'scroll-view': [{'bindscroll': ''}],
  \     'swiper': [{'autoplay': 'false', 'current': '0'}],
  \     'icon': [{'type': 'success', 'size': '23'}],
  \     'progress': [{'precent': '0'}],
  \     'button': [{'size': 'default'}],
  \     'checkbox-group': [{'bindchange': ''}],
  \     'checkbox': [{'value': '', 'checked': ''}],
  \     'form': [{'bindsubmit': ''}],
  \     'input': [{'type': 'text'}],
  \     'label': [{'for': ''}],
  \     'picker': [{'bindchange': ''}],
  \     'radio-group': [{'bindchange': ''}],
  \     'radio': [{'checked': ''}],
  \     'switch': [{'checked': ''}],
  \     'slider': [{'value': ''}],
  \     'action-sheet': [{'bindchange': ''}],
  \     'modal': [{'title': ''}],
  \     'loading': [{'bindchange': ''}],
  \     'toast': [{'duration': '1500'}],
  \     'audio': [{'src': ''}],
  \     'video': [{'src': ''}],
  \     'image': [{'src': '', 'mode': 'scaleToFill'}],
  \   }
  \ },
  \}
posted @ 2020-04-21 10:40  大道至诚  阅读(545)  评论(0编辑  收藏  举报