我的配置

"START =========================================================================
"set
syntax on
"color elflord ron industry pablo slate
colorscheme desert

let mapleader=' '
"set start
set number
set relativenumber
set cursorline

set hlsearch
set incsearch
set ignorecase
set smartcase

set mouse=a

set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L

" 设置字体
"set gfw=幼圆:h12:cGB2312

set autochdir

set listchars=tab:>-,trail:-
set list

"tab
set tabstop=4
set expandtab
set shiftwidth=4
set viminfo+=%

set showcmd
set wildmenu

"encoding

"set encoding=utf-8
"set fileencodings=ucs-bom,utf-8,cp936
"set fileencoding=gb2312
"set termencoding=utf-8

set fileencodings=ucs-bom,utf-8,utf-16,gbk,big5,gb18030,latin1

"set
"END ===========================================================================

"START =========================================================================
"map
imap jj

noremap :nohlsearch
noremap n :NERDTreeToggle

noremap w w
noremap h h
noremap j j
noremap k k
noremap l l
noremap t :tabnext
noremap T :tabNext

"调整窗口大小快捷键
noremap :res-1
noremap :res+1
noremap :vertical res-1
noremap :vertical res+1

noremap s :set list
noremap ns :set nolist

noremap x :set expandtab
noremap nx :set noexpandtab

map mm
"map
"END ===========================================================================

"START =========================================================================
"cmd
"autocmd VimEnter * NERDTree
"autocmd bufenter * NERDTree
autocmd GUIEnter * simalt ~X
"cmd
"END ===========================================================================

"START =========================================================================
"PlugInstall
call plug#begin('~/.vim/plugged')

Plug 'preservim/nerdtree'

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

Plug 'Yggdroot/LeaderF'
Plug 'BurntSushi/ripgrep'

"gutentags first,must install gtags and ctags
Plug 'ludovicchabant/vim-gutentags'
"Plug 'skywind3000/gutentags_plus'
Plug 'skywind3000/vim-preview'

Plug 'fholgado/minibufexpl.vim'

call plug#end()
"PlugInstall
"END ===========================================================================

"START =========================================================================
"config airline
"let g:airline_theme='dark'
"let g:airline#extensions#tabline#enabled=0
"END ===========================================================================

"START =========================================================================
"LeaderF
let g:Lf_RootMarkers = ['.froot', '.git', '.hg', '.svn' ]
let g:Lf_WorkingDirectoryMode = 'Ac'
"let g:Lf_UseCache=0 "After vim start, update cache when LeaderF first start F5 manually update
let g:Lf_Gtagslabel='new-ctags'

let g:Lf_Gtagsconf=expand('~\gtags.conf')
let g:Lf_CacheDirectory = expand('~/.cache/leaderf')
" 是否自动生成索引为LeaderF使用
" gtags 对大工程支出不友好,只有用ctags
let g:Lf_GtagsAutoGenerate=0
"LeaderF
"END ===========================================================================

"START =========================================================================
"gutentags plus
" change focus to quickfix window after search (optional).
let g:gutentags_plus_switch = 1
"gutentags plus
"END ===========================================================================

"START =========================================================================
"gutentags config
"path 0430
"let $GTAGSCONF = '~/gtags.conf'

" gutentags 搜索工程目录的标志,当前文件路径向上递归直到碰到这些文件/目录名
let g:gutentags_project_root = ['.root', '.svn', '.hg', '.project']

" 所生成的数据文件的名称
let g:gutentags_ctags_tagfile = '.tags'

" 同时开启 ctags 和 gtags 支持:
let g:gutentags_modules = []
if executable('ctags')
let g:gutentags_modules += ['ctags']
endif

"gtags can not support big project
if executable('gtags-cscope') && executable('gtags')
let g:gutentags_modules += ['gtags_cscope']
endif

" 将自动生成的 ctags/gtags 文件全部放入 ~/.cache/tags 目录中,避免污染工程目录
let g:gutentags_cache_dir = expand('~/.cache/tags')

" 配置 ctags 的参数,老的 Exuberant-ctags 不能有 --extra=+q,注意
let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q']
let g:gutentags_ctags_extra_args += ['--c++-kinds=+px']
let g:gutentags_ctags_extra_args += ['--c-kinds=+px']

" 如果使用 universal ctags 需要增加下面一行,老的 Exuberant-ctags 不能加下一行
let g:gutentags_ctags_extra_args += ['--output-format=e-ctags']

"0 禁用 gutentags 自动加载 gtags 数据库的行为
let g:gutentags_auto_add_gtags_cscope = 1

"0430
"set cscopetag
set cscopeprg='gtags-cscope'

nmap s :cs find s =expand(""):copen
nmap g :cs find g =expand("")
nmap c :cs find c =expand(""):copen
nmap t :cs find t =expand(""):copen
nmap e :cs find e =expand(""):copen
nmap f :cs find f =expand(""):copen
nmap i :cs find i ^=expand("")$:copen
nmap d :cs find d =expand(""):copen

" gutentags
"END ===========================================================================

"START =========================================================================
"Preview config
noremap :PreviewScroll -1
noremap :PreviewScroll +1
inoremap :PreviewScroll -1
inoremap :PreviewScroll +1
autocmd FileType qf nnoremap p :PreviewQuickfix
autocmd FileType qf nnoremap P :PreviewClose
"Preview
"END ===========================================================================

"START =========================================================================
"Minbuffer manager
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:bufExplorerMaxHeight=60
let g:miniBufExplorerMoreThanOne=0
"MinBuffer
"END ===========================================================================

你可能感兴趣的:(我的配置)