修复vimrc配置错乱的问题

This commit is contained in:
LingZhaoHui 2020-07-17 19:11:29 +08:00
parent e6e987eab5
commit a0cbe65872
17 changed files with 125 additions and 167 deletions

View File

@ -1,130 +0,0 @@
" ____________ __
" / ____/ ____/ / /_
" _____ / /___/ /_____ / /_/ __ _______
" /__ / / ____/ ____/ /___/ / /\ / / __ /
" / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / /
" /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ /
" _____/ /
" /______/
" @author:zeekling<zeekling@163.com>
"
" 插件
filetype off " required!
filetype indent on
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'ascenator/L9', {'name': 'newL9','for':'vim'}
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin', {'on': 'LoadPlugs'}
Plug 'majutsushi/tagbar',{'for':['java','sql','python','c','html','css','javascript','go']}
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'
" Plug 'terryma/vim-multiple-cursors'
" Plug 'powerline/fonts'
if v:version < 800
Plug 'scrooloose/syntastic',{'for':['java','sql','python','c','html','css','javascript']}
else
Plug 'w0rp/ale',{'for':['java','sql','python','c','html','css','javascript','go','sh','shell'], 'merged' : 0, 'loadconf_before' : 1} " 语法检测
endif
Plug 'godlygeek/tabular' ,{'on':'Tabbar'} " 代码美化工具
Plug 'jiangmiao/auto-pairs'
" Plug 'kien/rainbow_parentheses.vim'
" Plug 'roxma/vim-paste-easy' " Easy paste
"Plug 'ctrlpvim/ctrlp.vim'
Plug 'tacahiroy/ctrlp-funky'
" Plug 'rking/ag.vim'
Plug 'haya14busa/incsearch.vim'
" Plug 'Raimondi/delimitMate'
" Plug 'morhetz/gruvbox'
Plug 'mhinz/vim-signify'
Plug 'terryma/vim-smooth-scroll'
Plug 'mhinz/vim-startify'
" Plug 'rodjek/vim-puppet'
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'will133/vim-dirdiff',{'on':['DirDiff']}
Plug 'Chiel92/vim-autoformat', {'on': 'Autoformat'}
"Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' ,{'for':['java','sql','python','c','html','css','javascript']}
" Plug 'godlygeek/tabular'
" Plug 'mbbill/undotree'
" Plug 'romainl/vim-cool'
Plug 'liuchengxu/space-vim-dark'
Plug 'ryanoasis/vim-devicons'
" Plug 'Raimondi/delimitMate'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
" 自动补全html/xml标签
Plug 'docunext/closetag.vim', { 'for': ['html', 'xml'] }
Plug 'mattn/emmet-vim',{'for':['html','xml']}
Plug 'gko/vim-coloresque' ,{'for':['html','xml','css',]}
Plug 'pangloss/vim-javascript',{'for':['html','css','javascript']}
Plug 'hail2u/vim-css3-syntax',{'for':['html','css','javascript']}
" 快速赋值语句对齐
Plug 'junegunn/vim-easy-align',{'for':['java','c','python','markdown','sh','shell','c++','sql']}
" quickrun
Plug 'thinca/vim-quickrun',{'for':['java','c','python','sh','shell','c++']}
Plug 'chrisbra/changesPlugin'
" auto complete
"Plug 'SirVer/ultisnips',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
"Plug 'honza/vim-snippets',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'ycm-core/YouCompleteMe',{'do':'./install.py --clang-completer --java-completer','for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" Plug 'maralla/completor.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'shougo/neocomplete.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" java
Plug 'artur-shaik/vim-javacomplete2', {'for':'java'}
Plug 'mrtazz/DoxygenToolkit.vim', {'for':['java','c','c++']}
Plug 'airblade/vim-rooter', {'for':'java'}
" c
Plug 'vim-scripts/a.vim', {'for':['c','c++']}
Plug 'vim-scripts/c.vim', {'for':['c','c++']}
" markdown
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'iamcco/mathjax-support-for-mkdp', { 'for': 'markdown' }
Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
" python
" Plug 'rkulla/pydiction', { 'for': 'python' }
" Plug 'hdima/python-syntax', { 'for': 'python' }
" Plug 'hynek/vim-python-pep8-indent', { 'for': 'python' }
" Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'python' }
"Plug 'davidhalter/jedi-vim', { 'for': 'python' }
Plug 'python-mode/python-mode', { 'for': 'python','branch': 'develop' }
Plug 'tell-k/vim-autopep8', {'for': 'python'}
" Plug 'fisadev/vim-isort',{'for':'python'}
" sql
" Plug 'joereynolds/SQHell.vim',{'for':'sql'}
" on 语句不起作用
Plug 'mattn/vim-sqlfmt',{'on':'SQLfmt'}
" bash
Plug 'vim-scripts/bash-support.vim',{'for':['sh','bash']}
Plug 'chxuan/prepare-code'
call plug#end()
autocmd FileType java source ~/.vim/conf/java.vim
autocmd FileType c source ~/.vim/conf/c.vim
autocmd FileType python source ~/.vim/conf/python.vim
autocmd BufNewFile,BufRead *.md,*.markdown,*.mkd source ~/.vim/conf/markdown.vim
autocmd FileType sql source ~/.vim/conf/sql.vim
autocmd FileType html,css,javascript source ~/.vim/conf/html.vim
if filereadable(expand("~/.vim/conf/load.vim"))
source ~/.vim/conf/load.vim
endif
if filereadable(expand('~/.vim/conf/base.vim'))
source ~/.vim/conf/base.vim
endif
filetype plugin indent on
if filereadable(expand('~/.vim/custom/functions.vim'))
source ~/.vim/custom/functions.vim
endif

View File

@ -1,25 +1,22 @@
#!/usr/bin/env bash
echo " ____________ __ "
echo " / ____/ ____/ / /_ "
echo " _____ / /___/ /_____ / /_/ __ _______ "
echo " /__ / / ____/ ____/ /___/ / /\ / / __ / "
echo " / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / / "
echo " /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ / "
echo " _____/ / "
echo " /______/ "
echo " @author:zeekling<zeekling@163.com> "
echo " "
echo " ________ _______ _______ __ ___ __ __ .__ __. _______ "
echo " | / | ____|| ____|| |/ / | | | | | \ | | / _____| "
echo " ---/ / | |__ | |__ | / | | | | | \| | | | __ "
echo " / / | __| | __| | < | | | | | . | | | |_ | "
echo " / /----.| |____ | |____ | . \ | ----.| | | |\ | | |__| | "
echo " /________||_______||_______||__|\__\ |_______||__| |__| \__| \______| "
echo " "
echo " @author:zeekling<zeekling@zeekling.cn> "
echo " "
if [ ! -d '~/.vim/autoload/plug.vim' ];then
echo "开始安装vim-plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "安装vim-plug完成"
fi
echo "开始安装vim-plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "安装vim-plug完成"
PLUG_FILE="~/.vim/plugged"
PLUG_FILE="${HOME}/.vim/plugged"
if [ ! -f ${PLUG_FILE} ]; then
mkdir ${PLUG_FILE} -p
fi
echo "拷贝配置文件"
cp .vimrc ~/.vimrc && cp -rf .vim/* ~/.vim/
cp vimrc ~/.vimrc && cp -rf vim/* ~/.vim/
echo "拷贝完成,打开vim"

View File

@ -177,16 +177,12 @@ map <F10> :QuickRun<CR>
" mhinz/vim-startify
let g:startify_custom_header=[
\' ____________ __ ',
\' / ____/ ____/ / /_ ',
\' _____ / /___/ /_____ / /_/ __ _______ ',
\' /__ / / ____/ ____/ /___/ / /\ / / __ / ',
\' / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / / ',
\' /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ / ',
\' _____/ / ',
\' /______/ ',
\' @author:zeekling<zeekling@163.com> ',
\' ']
\' ________ _______ _______ __ ___ __ __ .__ __. _______',
\' | / | ____|| ____|| |/ / | | | | | \ | | / _____|',
\' ---/ / | |__ | |__ | / | | | | | \| | | | __',
\' / / | __| | __| | < | | | | | . | | | |_ |',
\' / /----.| |____ | |____ | . \ | `----.| | | |\ | | |__| |',
\' /________||_______||_______||__|\__\ |_______||__| |__| \__| \______|']
let g:startify_custom_footer=['结尾', ' 不想看到你']
" ryanoasis/vim-devicons
let g:webdevicons_enable_nerdtree = 1 " 我的电脑上显示有点问题

View File

@ -1,14 +1,12 @@
" ____________ __
" / ____/ ____/ / /_
" _____ / /___/ /_____ / /_/ __ _______
" /__ / / ____/ ____/ /___/ / /\ / / __ /
" / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / /
" /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ /
" _____/ /
" /______/
" @author:zeekling<zeekling@163.com>
" ________ _______ _______ __ ___ __ __ .__ __. _______
" | / | ____|| ____|| |/ / | | | | | \ | | / _____|
" `---/ / | |__ | |__ | ' / | | | | | \| | | | __
" / / | __| | __| | < | | | | | . ` | | | |_ |
" / /----.| |____ | |____ | . \ | `----.| | | |\ | | |__| |
" /________||_______||_______||__|\__\ |_______||__| |__| \__| \______|
"
" @author:zeekling<zeekling@zeekling.cn>
"
" 插件
filetype off " required!
filetype indent on

97
vimrc Normal file
View File

@ -0,0 +1,97 @@
" ____________ __
" / ____/ ____/ / /_
" _____ / /___/ /_____ / /_/ __ _______
" /__ / / ____/ ____/ /___/ / /\ / / __ /
" / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / /
" /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ /
" _____/ /
" /______/
" @author:zeekling<zeekling@163.com>
"
set ruler
autocmd BufWritePre * :%s/\s\+$//e " 自动清除末行空格
set magic " 设置魔术
set backspace=indent,eol,start
set nocompatible
syntax on
set foldmethod=indent
set foldlevelstart=99
nnoremap <space> za
" begin 20171129 mod
"colorscheme gruvbox
colorscheme space-vim-dark
set background=dark
"colorscheme molokai
" end 20171129 mod
set smartindent shiftwidth=4
set shiftwidth=4 "缩进宽度4
set tabstop=4 "tab键宽度4
set softtabstop=4 "制表符宽度4
set cursorline
set nocursorcolumn
set fencs=utf-8,gb18030
set guifont=DroidSansMono\ Nerd\ Font\ 11
set encoding=utf8
set laststatus=2 " 显示光标当前位置
set number
set cursorline
set cursorcolumn
set hlsearch
highlight LeaderTab guifg=#666666
set nobackup
set noswapfile
match LeaderTab /^\t/
set wildmenu
set cursorline
" vim 透明
hi Normal ctermfg=252 ctermbg=none
set autoindent
set smartindent
set noeb vb t_vb=
setlocal textwidth=120
" 设置加密方式
setlocal cm=blowfish2
let mapleader=','
let leader=','
let g:mapleader=','
let g:leader=','
" tab切换
map <leader>th :tabfirst<CR>
map <leader>tl :tablast<CR>
map <leader>tj :tabnext<CR>
map <leader>tk :tabprev<CR>
map <leader>tn :tabnext<CR>
map <leader>tp :tabprev<CR>
map <leader>te :tabedit<CR>
map <leader>td :tabclose<CR>
map <leader>tm :tabm<CR>
"buffer 切换
map <leader>bf :bf<CR>
map <leader>bn :bn<CR>
map <leader>bl :bl<CR>
map <leader>bf :bf<CR>
map <leader>bp :bp<CR>
" 快速关闭
map <leader>q :q<CR>
map <leader>wq :wq<CR>
map <leader>w :w<CR>
map <leader>mdp :MarkdownPreview<CR>
map <leader>s :shell<CR>
set wildignore=*.swp,*.bak,*.pyc,*.class,.svn,.git,*.o,*~
"在执行宏命令时,不进行显示重绘;在宏命令执行完成后,一次性重绘,以便提高性能。
set lazyredraw
if filereadable(expand('~/.vim/conf/init.vim'))
source ~/.vim/conf/init.vim
endif
set nocompatible
if filereadable(expand("~/.vim/vimrc"))
source ~/.vim/vimrc
endif
set cc=120