vim配置
来源:互联网 发布:十字绣制图软件 编辑:程序博客网 时间:2024/06/06 13:16
这是链接的地址
一,第一个地址修改文件.vimrc文件
set sw=4set ts=4set etset smarttabset smartindentset lbrset fo+=mBset smset selection=inclusiveset wildmenuset mousemodel=popupau FileType php setlocal dict+=~/.vim/dict/php_funclist.dictau FileType css setlocal dict+=~/.vim/dict/css.dictau FileType c setlocal dict+=~/.vim/dict/c.dictau FileType cpp setlocal dict+=~/.vim/dict/cpp.dictau FileType scale setlocal dict+=~/.vim/dict/scale.dictau FileType javascript setlocal dict+=~/.vim/dict/javascript.dictau FileType html setlocal dict+=~/.vim/dict/javascript.dictau FileType html setlocal dict+=~/.vim/dict/css.dict""syntastic相关execute pathogen#infect()let g:syntastic_python_checkers=['pylint']let g:syntastic_php_checkers=['php', 'phpcs', 'phpmd']"golang"Processing... % (ctrl+c to stop)let g:fencview_autodetect=0set rtp+=$GOROOT/misc/vim"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 显示相关 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""syntax onset cul "高亮光标所在行set cucset shortmess=atI " 启动的时候不显示那个援助乌干达儿童的提示 set go= " 不要图形按钮 "color desert " 设置背景主题 color ron " 设置背景主题 "color torte " 设置背景主题 "set guifont=Courier_New:h10:cANSI " 设置字体 "autocmd InsertLeave * se nocul " 用浅色高亮当前行 autocmd InsertEnter * se cul " 用浅色高亮当前行 set ruler " 显示标尺 set showcmd " 输入的命令显示出来,看的清楚些 "set whichwrap+=<,>,h,l " 允许backspace和光标键跨越行边界(不建议) set scrolloff=3 " 光标移动到buffer的顶部和底部时保持3行距离 set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} "状态行显示的内容 set laststatus=2 " 启动显示状态行(1),总是显示状态行(2) "set foldenable " 允许折叠 ""set foldmethod=manual " 手动折叠 set nocompatible "去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限 " 显示中文帮助if version >= 603 set helplang=cn set encoding=utf-8endif" 自动缩进set autoindentset cindent" Tab键的宽度set tabstop=4" 统一缩进为4set softtabstop=4set shiftwidth=4" 使用空格代替制表符set expandtab" 在行和段开始处使用制表符set smarttab" 显示行号set number" 历史记录数set history=1000"搜索逐字符高亮set hlsearchset incsearch"语言设置set langmenu=zh_CN.UTF-8set helplang=cn" 总是显示状态行set cmdheight=2" 侦测文件类型filetype on" 载入文件类型插件filetype plugin on" 为特定文件类型载入相关缩进文件filetype indent on" 保存全局变量set viminfo+=!" 带有如下符号的单词不要被换行分割set iskeyword+=_,$,@,%,#,-" 字符间插入的像素行数目"markdown配置au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=mkdau BufRead,BufNewFile *.{go} set filetype=goau BufRead,BufNewFile *.{js} set filetype=javascript"rkdown to HTML nmap md :!~/.vim/markdown.pl % > %.html <CR><CR>nmap fi :!firefox %.html & <CR><CR>nmap \ \ccvmap \ \cc"将tab替换为空格nmap tt :%s/\t/ /g<CR>""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""新文件标题"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""新建.c,.h,.sh,.java文件,自动插入文件头 autocmd BufNewFile *.cpp,*.[ch],*.sh,*.rb,*.java,*.py exec ":call SetTitle()" ""定义函数SetTitle,自动插入文件头 func SetTitle() "如果文件类型为.sh文件 if &filetype == 'sh' call setline(1,"\#!/bin/bash") call append(line("."), "") elseif &filetype == 'python' call setline(1,"#!/usr/bin/env python") call append(line("."),"# coding=utf-8") call append(line(".")+1, "") elseif &filetype == 'ruby' call setline(1,"#!/usr/bin/env ruby") call append(line("."),"# encoding: utf-8") call append(line(".")+1, "")" elseif &filetype == 'mkd'" call setline(1,"<head><meta charset=\"UTF-8\"></head>") else call setline(1, "/*************************************************************************") call append(line("."), " > File Name: ".expand("%")) call append(line(".")+1, " > Author: 陈松songli") call append(line(".")+2, " > QQ: 2734030745") call append(line(".")+3, " > Mail: 15850774503@163.com") call append(line(".")+4, " > Created Time: ".strftime("%c")) call append(line(".")+5, " ************************************************************************/") call append(line(".")+6, "") endif if expand("%:e") == 'cpp' call append(line(".")+7, "#include<iostream>") call append(line(".")+8, "using namespace std;") call append(line(".")+9, "") call append(line(".")+10, "") call append(line(".")+11, "") call append(line(".")+12, "int main(int argc, char *argv[])") call append(line(".")+13, "{") call append(line(".")+14, "") call append(line(".")+15, " return 0;") call append(line(".")+16, "}") endif if &filetype == 'c' call append(line(".")+7, "#include<stdio.h>") call append(line(".")+8, "#include<stdlib.h>") call append(line(".")+9, "") call append(line(".")+10, "") call append(line(".")+11, "") call append(line(".")+12, "int main(int argc, char *argv[])") call append(line(".")+13, "{") call append(line(".")+14, "") call append(line("."), "") call append(line(".")+15, " return 0;") call append(line(".")+16, "}") endif if expand("%:e") == 'h' call append(line(".")+7, "#ifndef _".toupper(expand("%:r"))."_H") call append(line(".")+8, "#define _".toupper(expand("%:r"))."_H") call append(line(".")+9, "#endif") endif if &filetype == 'java' call append(line(".")+7,"public class ".expand("%:r")) call append(line(".")+8,"") endif "新建文件后,自动定位到文件末尾endfunc autocmd BufNewFile * normal G"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""键盘命令"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""":nmap <silent> <F9> <ESC>:Tlist<RETURN>" shift tab pagesmap <S-Left> :tabp<CR>map <S-Right> :tabn<CR>map! <C-Z> <Esc>zzimap! <C-O> <C-Y>,map <C-A> ggVG$"+ymap <F12> gg=Gmap <C-w> <C-w>wimap <C-k> <C-y>,imap <C-t> <C-q><TAB>imap <C-j> <ESC>" 选中状态下 Ctrl+c 复制"map <C-v> "*paimap <C-v> <Esc>"*paimap <C-a> <Esc>^imap <C-e> <Esc>$vmap <C-c> "+yset mouse=v"set clipboard=unnamed"去空行 nnoremap <F2> :g/^\s*$/d<CR> "比较文件 nnoremap <C-F2> :vert diffsplit "nnoremap <Leader>fu :CtrlPFunky<Cr>"nnoremap <C-n> :CtrlPFunky<Cr>"列出当前目录文件 map <F3> :NERDTreeToggle<CR>imap <F3> <ESC> :NERDTreeToggle<CR>"打开树状文件目录 map <C-F3> \be :autocmd BufRead,BufNewFile *.dot map <F5> :w<CR>:!dot -Tjpg -o %<.jpg % && eog %<.jpg <CR><CR> && exec "redr!""C,C++ 按F5编译运行map <F5> :call CompileRunGcc()<CR>func! CompileRunGcc() exec "w" if &filetype == 'c' exec "!g++ % -o %<" exec "!time ./%<" elseif &filetype == 'cpp' exec "!g++ % -o %<" exec "!time ./%<" elseif &filetype == 'java' exec "!javac %" exec "!time java %<" elseif &filetype == 'sh' :!time bash % elseif &filetype == 'python' exec "!time python2.7 %" elseif &filetype == 'html' exec "!firefox % &" elseif &filetype == 'go'" exec "!go build %<" exec "!time go run %" elseif &filetype == 'mkd' exec "!~/.vim/markdown.pl % > %.html &" exec "!firefox %.html &" endifendfunc"C,C++的调试map <F8> :call Rungdb()<CR>func! Rungdb() exec "w" exec "!g++ % -g -o %<" exec "!gdb ./%<"endfunc"代码格式优化化map <F6> :call FormartSrc()<CR><CR>"定义FormartSrc()func FormartSrc() exec "w" if &filetype == 'c' exec "!astyle --style=ansi -a --suffix=none %" elseif &filetype == 'cpp' || &filetype == 'hpp' exec "r !astyle --style=ansi --one-line=keep-statements -a --suffix=none %> /dev/null 2>&1" elseif &filetype == 'perl' exec "!astyle --style=gnu --suffix=none %" elseif &filetype == 'py'||&filetype == 'python' exec "r !autopep8 -i --aggressive %" elseif &filetype == 'java' exec "!astyle --style=java --suffix=none %" elseif &filetype == 'jsp' exec "!astyle --style=gnu --suffix=none %" elseif &filetype == 'xml' exec "!astyle --style=gnu --suffix=none %" else exec "normal gg=G" return endif exec "e! %"endfunc"结束定义FormartSrc""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""实用设置"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""if has("autocmd") autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endifendif"当打开vim且没有文件时自动打开NERDTreeautocmd vimenter * if !argc() | NERDTree | endif" 只剩 NERDTree时自动关闭autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif" 设置当文件被改动时自动载入set autoread" quickfix模式autocmd FileType c,cpp map <buffer> <leader><space> :w<cr>:make<cr>"代码补全 set completeopt=preview,menu "允许插件 "filetype plugin on"共享剪贴板 "set clipboard+=unnamed "自动保存set autowrite"set ruler " 打开状态栏标尺"set cursorline " 突出显示当前行set magic " 设置魔术set guioptions-=T " 隐藏工具栏set guioptions-=m " 隐藏菜单栏""set foldcolumn=0""set foldmethod=indent ""set foldlevel=3 " 不要使用vi的键盘模式,而是vim自己的set nocompatible" 去掉输入错误的提示声音set noeb" 在处理未保存或只读文件的时候,弹出确认set confirm"禁止生成临时文件set nobackupset noswapfile"搜索忽略大小写set ignorecaseset linespace=0" 增强模式中的命令行自动完成操作set wildmenu" 使回格键(backspace)正常处理indent, eol, start等set backspace=2" 允许backspace和光标键跨越行边界set whichwrap+=<,>,h,l" 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位)set mouse=aset selection=exclusiveset selectmode=mouse,key" 通过使用: commands命令,告诉我们文件的哪一行被改变过set report=0" 在被分割的窗口间显示空白,便于阅读set fillchars=vert:\ ,stl:\ ,stlnc:\" 高亮显示匹配的括号set showmatch" 匹配括号高亮的时间(单位是十分之一秒)set matchtime=1" 光标移动到buffer的顶部和底部时保持3行距离set scrolloff=3" 为C程序提供自动缩进"自动补全"":inoremap ( ()<ESC>i"":inoremap ) <c-r>=ClosePair(')')<CR>":inoremap { {<CR>}<ESC>O":inoremap } <c-r>=ClosePair('}')<CR>"":inoremap [ []<ESC>i"":inoremap ] <c-r>=ClosePair(']')<CR>"":inoremap " ""<ESC>i"":inoremap ' ''<ESC>i""function! ClosePair(char)"" if getline('.')[col('.') - 1] == a:char"" return "\<Right>""" else"" return a:char"" endif""endfunctionfiletype plugin indent on "打开文件类型检测, 加了这句才可以用智能补全set completeopt=longest,menu"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" CTags的设定 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""let Tlist_Sort_Type = "name" " 按照名称排序 let Tlist_Use_Right_Window = 1 " 在右侧显示窗口 let Tlist_Compart_Format = 1 " 压缩方式 let Tlist_Exist_OnlyWindow = 1 " 如果只有一个buffer,kill窗口也kill掉buffer ""let Tlist_File_Fold_Auto_Close = 0 " 不要关闭其他文件的tags ""let Tlist_Enable_Fold_Column = 0 " 不要显示折叠树 "let Tlist_Show_One_File=1 "不同时显示多个文件的tag,只显示当前文件的"设置tags set tags=tags; set autochdir """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""其他东东""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""默认打开Taglist let Tlist_Auto_Open=0 """""""""""""""""""""""""""""" " Tag list (ctags) """""""""""""""""""""""""""""""" let Tlist_Ctags_Cmd = '/usr/local/bin/ctags' let Tlist_Show_One_File = 1 "不同时显示多个文件的tag,只显示当前文件的 let Tlist_File_Fold_Auto_Close = 1let Tlist_Exit_OnlyWindow = 1 "如果taglist窗口是最后一个窗口,则退出vim let Tlist_Use_Right_Window = 1 "在右侧窗口中显示taglist窗口" minibufexpl插件的一般设置let g:miniBufExplMapWindowNavVim = 1let g:miniBufExplMapWindowNavArrows = 1let g:miniBufExplMapCTabSwitchBufs = 1let g:miniBufExplModSelTarget = 1 nmap tl :Tlist<cr>"python补全let g:pydiction_location = '~/.vim/after/complete-dict'let g:pydiction_menu_height = 20let Tlist_Ctags_Cmd='/usr/local/bin/ctags'let g:miniBufExplMapWindowNavVim = 1let g:miniBufExplMapWindowNavArrows = 1let g:miniBufExplMapCTabSwitchBufs = 1let g:miniBufExplModSelTarget = 1set iskeyword+=.set termencoding=utf-8set encoding=utf8set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030autocmd FileType python set omnifunc=pythoncomplete#Complete"set nocompatible " be iMproved"filetype off " required!set rtp+=~/.vim/bundle/vundle/call vundle#rc()" let Vundle manage Vundle" required! Bundle 'gmarik/vundle'" My Bundles here:"" original repos on githubBundle 'tpope/vim-fugitive'Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}Bundle 'Yggdroot/indentLine'let g:indentLine_char = '┊'"ndle 'tpope/vim-rails.git'" vim-scripts reposBundle 'L9'Bundle 'FuzzyFinder'" non github reposBundle 'https://github.com/wincent/command-t.git'Bundle 'Auto-Pairs'Bundle 'python-imports.vim'Bundle 'CaptureClipboard'Bundle 'ctrlp-modified.vim'Bundle 'last_edit_marker.vim'Bundle 'synmark.vim'"Bundle 'Python-mode-klen'Bundle 'SQLComplete.vim'Bundle 'Javascript-OmniCompletion-with-YUI-and-j'"Bundle 'JavaScript-Indent'"Bundle 'Better-Javascript-Indentation'Bundle 'jslint.vim'Bundle "pangloss/vim-javascript"Bundle 'Vim-Script-Updater'Bundle 'ctrlp.vim'Bundle 'tacahiroy/ctrlp-funky'Bundle 'jsbeautify'Bundle 'The-NERD-Commenter'"djangoBundle 'django_templates.vim'Bundle 'Django-Projects'"Bundle 'FredKSchott/CoVim'"Bundle 'djangojump'" ...let g:html_indent_inctags = "html,body,head,tbody"let g:html_indent_script1 = "inc"let g:html_indent_style1 = "inc"filetype plugin indent on " required!""ctrlp设置"set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.png,*.jpg,*.gif " MacOSX/Linuxset wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe,*.pyc,*.png,*.jpg,*.gif " Windowslet g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'let g:ctrlp_custom_ignore = '\v\.(exe|so|dll)$'let g:ctrlp_extensions = ['funky']let NERDTreeIgnore=['\.pyc']
这是链接地址
二,第二个也修改.vimrc文件
"" __ _(_)_ __ ___ _ __ ___" \ \ / / | '_ ` _ \| '__/ __|" \ V /| | | | | | | | | (__" (_)_/ |_|_| |_| |_|_| \___|"" Author: chxuan <787280310@qq.com>" Source: https://github.com/chxuan/vimplus" genernal settingssyntax enablesyntax onset t_Co=256set cul set shortmess=atI autocmd InsertEnter * se cul set ruler set showcmd set scrolloff=3 set laststatus=2set autoindentset smartindentset cindentset cinoptions=g0,:0,N-s,(0set tabstop=4set softtabstop=4set shiftwidth=4set expandtabset smarttabset numberset history=1000set hlsearchset incsearchset langmenu=zh_CN.UTF-8set helplang=cnset cmdheight=2set autoreadset completeopt=preview,menu set autowriteset magic set guioptions-=T set guioptions-=m set nocompatibleset noebset confirmset nobackupset noswapfileset ignorecaseset linespace=0set wildmenuset backspace=2set whichwrap+=<,>,h,lset mouse=aset selection=exclusiveset selectmode=mouse,keyset report=0set fillchars=vert:\ ,stl:\ ,stlnc:\set showmatchset matchtime=1set scrolloff=3set completeopt=longest,menuset iskeyword+=.set termencoding=utf-8set encoding=utf8set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030filetype onfiletype plugin onfiletype indent on" create file settingsautocmd BufNewFile *.cpp,*.cc,*.c,*.hpp,*.h,*.sh,*.py exec ":call SetTitle()" func SetTitle() if expand("%:e") == 'sh' call setline(1,"/*************************************************************************") call append(line(".")+1, "") call append(line("."),"\#!/bin/bash") call append(line("."), " ************************************************************************/") call append(line("."), " > Created Time: ".strftime("%c")) call append(line("."), " > Mail: 15850774503@163.com") call append(line("."), " > QQ: 2734030745") call append(line("."), " > Author: songli") call append(line("."), " > File Name: ".expand("%")) call append(line("."), "") elseif expand("%:e") == 'py' call setline(1,"/*************************************************************************") call append(line(".")+1, "") call append(line("."),"# coding=utf-8") call append(line("."),"\#!/usr/bin/env python") call append(line("."), " ************************************************************************/") call append(line("."), " > Created Time: ".strftime("%c")) call append(line("."), " > Mail: 15850774503@163.com") call append(line("."), " > QQ: 2734030745") call append(line("."), " > Author: songli") call append(line("."), " > File Name: ".expand("%")) elseif expand("%:e") == 'cpp' call setline(1, "/*************************************************************************") call append(line("."), "}") call append(line("."), " return 0;") call append(line("."), "") call append(line("."), "") call append(line(".")+1, "") call append(line("."), "{") call append(line("."), "int main(int argc, char *argv[])") call append(line("."), "") call append(line("."), "") call append(line("."), "using namespace std;") call append(line("."), "#include <iostream>") call append(line("."), " ************************************************************************/") call append(line("."), " > Created Time: ".strftime("%c")) call append(line("."), " > Mail: 15850774503@163.com") call append(line("."), " > QQ: 2734030745") call append(line("."), " > Author: songli") call append(line("."), " > File Name: ".expand("%")) elseif expand("%:e") == 'cc' call setline(1, "/*************************************************************************") call append(line("."), "}") call append(line("."), " return 0;") call append(line("."), "") call append(line("."), "") call append(line(".")+1, "") call append(line("."), "{") call append(line("."), "int main(int argc, char *argv[])") call append(line("."), "") call append(line("."), "") call append(line("."), "using namespace std;") call append(line("."), "#include <iostream>") call append(line("."), " ************************************************************************/") call append(line("."), " > Created Time: ".strftime("%c")) call append(line("."), " > Mail: 15850774503@163.com") call append(line("."), " > QQ: 2734030745") call append(line("."), " > Author: 陈松songli") call append(line("."), " > File Name: ".expand("%")) elseif expand("%:e") == 'c' call setline(1, "/*************************************************************************") call append(line("."), "}") call append(line("."), " return 0;") call append(line("."), "") call append(line("."), "") call append(line(".")+1, "") call append(line("."), "{") call append(line("."), "int main(int argc, char *argv[])") call append(line("."), "") call append(line("."), "") call append(line("."), "#include <stdio.h>") call append(line("."), " ************************************************************************/") call append(line("."), " > Created Time: ".strftime("%c")) call append(line("."), " > Mail: 15850774503@163.com") call append(line("."), " > QQ: 2734030745") call append(line("."), " > Author: 陈松songli") call append(line("."), " > File Name: ".expand("%")) elseif expand("%:e") == 'h' call append(line("."), "#endif") call append(line(".")+1, "") call append(line("."), "#define _".toupper(expand("%:r"))."_H") call append(line("."), "#ifndef _".toupper(expand("%:r"))."_H") elseif expand("%:e") == 'hpp' call append(line("."), "#endif") call append(line(".")+1, "") call append(line("."), "#define _".toupper(expand("%:r"))."_HPP") call append(line("."), "#ifndef _".toupper(expand("%:r"))."_HPP") endifendfunc autocmd BufNewFile * normal G" Vundleset nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'VundleVim/Vundle.vim'Plugin 'L9'Plugin 'chxuan/change-colorscheme'Plugin 'jiangmiao/auto-pairs'Plugin 'scrooloose/nerdcommenter'Plugin 'scrooloose/nerdtree'Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}Plugin 'Valloric/MatchTagAlways'Plugin 'Valloric/YouCompleteMe'Plugin 'docunext/closetag.vim'Plugin 'godlygeek/tabular'Plugin 'tpope/vim-fugitive'Plugin 'tpope/vim-surround'Plugin 'tpope/vim-commentary'Plugin 'tpope/vim-repeat'Plugin 'tpope/vim-endwise'Plugin 'ctrlpvim/ctrlp.vim'Plugin 'majutsushi/tagbar'Plugin 'octol/vim-cpp-enhanced-highlight'Plugin 'vim-airline/vim-airline'Plugin 'vim-airline/vim-airline-themes'Plugin 'vim-scripts/a.vim'Plugin 'vim-scripts/DoxygenToolkit.vim'Plugin 'vim-scripts/SQLComplete.vim'Plugin 'vim-scripts/txt.vim'Plugin 'ryanoasis/vim-devicons'Plugin 'gorodinskiy/vim-coloresque'Plugin 'will133/vim-dirdiff'Plugin 'haya14busa/incsearch.vim'Plugin 'mhinz/vim-startify'call vundle#end() filetype plugin indent on " load vim default pluginruntime macros/matchit.vim" change-colorschememap <F10> :NextColorScheme<CR>imap <F10> <ESC> :NextColorScheme<CR>map <F9> :PreviousColorScheme<CR>imap <F9> <ESC> :PreviousColorScheme<CR>" nerdtreemap <F3> :NERDTreeToggle<CR>imap <F3> <ESC> :NERDTreeToggle<CR>"autocmd vimenter * if !argc() | NERDTree | endif"autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif" Doxygenlet g:DoxygenToolkit_authorName="chxuan, 787280310@qq.com"let s:licenseTag = "Copyright(C)\<enter>"let s:licenseTag = s:licenseTag . "For free\<enter>"let s:licenseTag = s:licenseTag . "All right reserved\<enter>"let g:DoxygenToolkit_licenseTag = s:licenseTaglet g:DoxygenToolkit_briefTag_funcName="yes"let g:doxygen_enhanced_color=1let g:DoxygenToolkit_commentType="Qt"" YCMlet g:ycm_confirm_extra_conf = 0 let g:ycm_error_symbol = '>>'let g:ycm_warning_symbol = '>*'let g:ycm_seed_identifiers_with_syntax = 1 let g:ycm_complete_in_comments = 1 let g:ycm_complete_in_strings = 1 "let g:ycm_cache_omnifunc = 0 let mapleader = ","nnoremap <leader>u :YcmCompleter GoToDeclaration<CR>nnoremap <leader>i :YcmCompleter GoToDefinition<CR>nnoremap <leader>o :YcmCompleter GoToInclude<CR>nmap <F5> :YcmDiags<CR>" ctagsset tags+=/usr/include/tagsset tags+=~/.vim/systagsset tags+=~/.vim/x86_64-linux-gnu-systagslet g:ycm_collect_identifiers_from_tags_files = 1" let g:ycm_semantic_triggers = {} let g:ycm_semantic_triggers = { \ 'c' : ['->', '.','re![_a-zA-z0-9]'], \ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s', \ 're!\[.*\]\s'], \ 'ocaml' : ['.', '#'], \ 'cpp,objcpp' : ['->', '.', '::','re![_a-zA-Z0-9]'], \ 'perl' : ['->'], \ 'php' : ['->', '::'], \ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'], \ 'ruby' : ['.', '::'], \ 'lua' : ['.', ':'], \ 'erlang' : [':'], \ }let g:ycm_semantic_triggers.c = ['->', '.', ' ', '(', '[', '&',']']" a.vim: .h -> .cpp or .cpp -> .hnnoremap <silent> <F2> :A<CR>" tagbarlet g:tagbar_ctags_bin = '/usr/bin/ctags'let g:tagbar_width = 30map <F4> :TagbarToggle<CR>imap <F4> <ESC> :TagbarToggle<CR>" colorschemeset background=darklet g:solarized_termcolors=256colorscheme solarized"colorscheme monokai" cpp_class_scope_highlightlet g:cpp_class_scope_highlight = 1let g:cpp_experimental_template_highlight = 1let c_no_curly_error = 1" airlinelet g:airline_theme="luna"" let g:airline_theme="badwolf"let g:airline_powerline_fonts = 1"let g:airline_section_b = '%{strftime("%c")}'"let g:airline_section_y = 'BN: %{bufnr("%")}'let g:airline#extensions#tabline#enabled = 1let g:airline#extensions#tabline#left_sep = ' 'let g:airline#extensions#tabline#left_alt_sep = '|'if !exists('g:airline_symbols') let g:airline_symbols = {}endiflet g:airline_left_sep = ''let g:airline_left_alt_sep = ''let g:airline_right_sep = ''let g:airline_right_alt_sep = ''nnoremap <C-N> :bn<CR>nnoremap <C-P> :bp<CR>" ctrlplet g:ctrlp_map = '<c-f>'let g:ctrlp_cmd = ':CtrlP'let g:ctrlp_working_path_mode = '0'set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux" vim-deviconsset guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12" incsearch.vimmap / <Plug>(incsearch-forward)map ? <Plug>(incsearch-backward)map g/ <Plug>(incsearch-stay)
三, 是我自己配置.vimrc文件
set nu set tabstop=4 "Tab " set shiftwidth=4 set encoding=utf-8 "智能补全命令行 set wildmenu set cul "高亮光标" set autoindent "自动" "set hidden " Hide buffers when they are abandoned "set mouse=a " Enable mouse usage (all modes) set nu set tabstop=4 "Tab " set shiftwidth=4 set encoding=utf-8 "智能补全命令行 set wildmenu set cul "高亮光标" set autoindent "自动" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v] [%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} set laststatus=2 colo evening set guifont=Courier\ New\ 14 " 设置字体 "colorscheme desert "颜色配置 set nocompatible "set scrolloff=3 set ruler
阅读全文
0 0
- vim配置NERD_tree.vim
- [Linux][Vim]:vim 配置
- vim配置NERD_tree.vim
- vim 配置vim
- vim 配置
- vim 配置
- vim配置
- vim 配置
- vim 配置
- vim 配置
- vim 配置
- vim配置
- vim配置
- VIM 配置
- vim 配置
- vim 配置
- VIM配置
- vim配置
- [BZOJ1367] [Baltic2004]sequence
- 【HDU 1873】看病要排队(优先队列-好题)
- js中相似的方法
- 训练总结8.2
- Git本地服务器搭建及使用详解
- vim配置
- 正则表达式
- 单位分解有限元方法(PUFEM)
- 进程间通信--管道
- ArrayList实现中的SubList
- HDU 3652 数位DP
- 洛谷[P3616] 富金森林公园【数据结构】【线段树】【树状数组】
- 浅读K-means
- #7 处理元数据