Vim 配置文件
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim " 加入运行时路径
call vundle#begin() " 初始化
" 插件列表开始
Plugin 'VundleVim/Vundle.vim'
Plugin 'godlygeek/tabular'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdtree'
Plugin 'neoclide/coc.nvim', {'branch': 'release'}
Plugin 'preservim/tagbar'
Plugin 'liuchengxu/vim-clap', { 'do': ':Clap install-binary' }
Plugin 'jiangmiao/auto-pairs'
Plugin 'dkprice/vim-easygrep'
Plugin 'vim-scripts/taglist.vim'
Plugin 'Yggdroot/LeaderF',{'do':'./install.sh'}
Plugin 'Yggdroot/indentLine'
Plugin 'luochen1990/rainbow'
Plugin 'tpope/vim-surround'
Plugin 'ryanoasis/vim-devicons'
Plugin 'vim-scripts/winmanager'
" 插件列表结束
call vundle
filetype plugin indent on " 打开文件类型检测
" 256-color
set t_Co=256
" molokai 主题
" 设置字符编码 UTF-8
set encoding=utf-8
set termencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
" 代码设置
syntax enable " 启用语法高亮
syntax on " 打开语法高亮
set showmatch " 自动匹配括号
set cursorcolumn " 显示光标所在列
set cursorline " 显示光标所在行
set guicursor+=a:blinkon0 " 设置光标不闪烁
set showcmd " 显示当前执行的命令
set mouse=a
set selection=exclusive
set selectmode=mouse,key
" 四格缩进
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set nu " 启用行号显示
set ru
set hlsearch " 启用高亮查找
set incsearch " 启用增量查找
"设置vim 的主题样式
colorscheme spring-night
set report=0
set shortmess=atI
set noswapfile
let g:airline#extensions#tabline#enabled=1
let NERDTreeWinPos="right"
nmap <F3> :TlistToggle<CR>
let g:clap_layout = { 'relative': 'editor' }
let g:clap_theme = 'material_design_dark'
let g:AutoPairsFlyMode = 1
let mapleader = '/'
let g:EasyGrepMode = 2 " All:0, Open Buffers:1, TrackExt:2,
let g:EasyGrepCommand = 0 " Use vimgrep:0, grepprg:1
let g:EasyGrepRecursive = 1 " Recursive searching
let g:EasyGrepIgnoreCase = 1 " not ignorecase:0
let g:EasyGrepFilesToExclude = "*.bak,*.so, *.a, *.o, *.pyc, *.bak,*.out,*.d,*.elf"
nmap <C-S> :w<cr>
nmap <C-Q> :q<cr>
nmap <C-S-B> :make<cr>
nmap <C-S-T> :!ctags -R<cr> :!cscope -Rbq<cr>
nmap <C-S-R> :!rm rags<cr> :!rm *.out<cr>
let Tlist_auto_open=1
set tags=tags
set autochdir
let g:pydiction_location='~/.vim/tools/pydiction/complete-dict'
"coc vim config
inoremap <expr><Tab> pumvisible()? "\<C-n>":"\<Tab>"
inoremap <expr><S-Tab> pumvisible()? "\<C-p>":"\<S-Tab>"
let g:rainbow_active = 1
"spec show line
set cuc
set cul
map <silent> <F2> :NERDTreeToggle<cr>
"WinMangerConfig
let g:NERDTree_title='NERD Tree'
let g:winManagerWindowLayout='NERDTree|TagList'
function! NERDTree_Start()
exec 'NERDTree'
endfunction
function! NERDTree_IsValid()
return 1
endfunction
nmap <silent> wm :WMToggle<cr>
nmap <tab> :bn<cr> "设置tab键映射
- 可以tab 键位补全
- 可以Ctr-S 保存文件
- 可以Ctr-Shift-B 编译 Makefile 工程, 当然也可以自己配置 cmake 等工程方法
- nmap 映射快捷键位
|