自己的~/.vimrc
" 语法高亮
syntax on
" 搜索高亮
set hlsearch
" 显示行号
set number"
let mapleader=","
set pastetoggle=<F10>
set backspace=indent,eol,start
" 基本缩进效果
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
let g:ycm_server_python_interpreter='/usr/bin/python'
let g:ycm_global_ycm_extra_conf='/home/jyb/.vim/.ycm_extra_conf.py'
let g:ycm_enable_diagnostic_highlighting = 0
set nocompatible " be iMproved, required........
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Plugin 'Valloric/YouCompleteMe'
Bundle 'ctrlpvim/ctrlp.vim'
Bundle 'taglist.vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'jiangmiao/auto-pairs'
Plugin 'git://github.com/scrooloose/nerdtree.git'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
"Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
"Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"折叠设置"
let xml_syntax_folding=1 " XML fold
"set foldmethod=syntax
set foldlevelstart=1
" 用空格键来开关折叠
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
" Command-line mode
" set mouse=a 启动所有模式,会屏蔽鼠标右键功能
set mouse=c
"ctrlp 配置
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
map <c-k> :CtrlPMRUFiles<CR>
let g:ctrlp_tabpage_position = 'ac'
let g:ctrlp_extensions = ['tag']
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_working_path_mode = 0
let g:ctrlp_use_caching = 1
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_mruf_max = 250
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.rc,*.aps,*.vcproj.*,/home/shuaijun/se/SimulationEngine_Rapid/tinyxml/*
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|\.yardoc\|public\/images\|public\/system\|data\|log\|tmp$\|node_modules\|vendor',
\ 'file': '\.exe$\|\.so$\|\.dat$'
\ }
"nerdtree配置
" 设置<F5> 关闭打开NerdTree
map <F5> :NERDTreeMirror<CR>
map <F5> :NERDTreeToggle<CR>
" " 显示行号
let NERDTreeShowLineNumbers=1
let NERDTreeAutoCenter=1
" 是否显示隐藏文件
let NERDTreeShowHidden=1
" 设置宽度
let NERDTreeWinSize=31
" 在终端启动vim时,共享NERDTree
let g:nerdtree_tabs_open_on_console_startup=1
" 忽略一下文件的显示
let NERDTreeIgnore=['\.pyc','\~$','\.swp']
" 显示书签列表
let NERDTreeShowBookmarks=1
" 窗口位置
let g:NERDTreeWinPos="right"
"cscope自动更新
function! UpdateCscope()
let db = findfile("cscope.out", ".;")
if (!empty(db))
let oldpath = getcwd()
let path = strpart(db, 0, match(db, "/cscope.out$"))
if (!empty(path))
exe "cd " . path
endif
"!cscope -Rbq
!find -name "*.[ch]" -o -name "*.cpp" > cscope.files
!cscope -bR -i cscope.files
exe "cd " . oldpath
endif
endfunction
au VimEnter * silent! call UpdateCscope()
" auto load cscope file [start]
function! LoadCscope()
set cst
set csto=0
set nocsverb
let db = findfile("cscope.out", ".;")
if (!empty(db))
let path = strpart(db, 0, match(db, "/cscope.out$"))
set nocscopeverbose " suppress 'duplicate connection' error
exe "cs add " . db . " " . path
set cscopeverbose
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
endfunction
au BufEnter /* call LoadCscope()
" auto load cscope file [end]
" 基于缩进或语法进行代码折叠
"set foldmethod=indent
set foldmethod=syntax
" 启动vim时关闭折叠代码
set nofoldenable
" 配置vim-airline 开始
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'default'
let g:airline_theme='dark'
let g:airline_powerline_fonts = 1
let g:airline_highlighting_cache = 1
let Tlist_Auto_Open=1
let g:airline_powerline_fonts = 1
"打开tabline功能,方便查看Buffer和切换,省去了minibufexpl插件 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#buffer_nr_show = 1 "设置切换Buffer快捷键" nnoremap <C-tab> :bn<CR> nnoremap <C-s-tab> :bp<CR> " 关闭状态显示空白符号计数
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#whitespace#symbol = '!'
" 设置consolas字体"前面已经设置过
"set guifont=Consolas\ for\ Powerline\ FixedD:h11 if !exists('g:airline_symbols') let g:airline_symbols = {} endif " old vim-powerline symbols
let g:airline_left_sep = '⮀'
let g:airline_left_alt_sep = '⮁'
let g:airline_right_sep = '⮂'
let g:airline_right_alt_sep = '⮃'
set t_Co=256
" taglist配置
" 只显示当前文件的tags
let Tlist_Show_One_File=1
" 设置taglist宽度
let Tlist_WinWidth=40
" tagList窗口是最后一个窗口,则退出Vim
let Tlist_Exit_OnlyWindow=1
" 让taglist窗口出现在Vim的左边边
let Tlist_Use_Left_Window=1
" 当同时显示多个文件中的tag时,设置为1,可使taglist只显示当前文件tag,其它文件的tag都被折叠起来。
let Tlist_File_Fold_Auto_Close=1
map <F6> :Tlist<CR>
自己的~/.vimrc的更多相关文章
- 如何设置Vimrc
.title { text-align: center } .todo { font-family: monospace; color: red } .done { color: green } .t ...
- vimrc
我的vimrc https://github.com/juandx/vimrc 当然得装vundle git clone https://github.com/VundleVim/Vundle.vim ...
- Linux上 .vimrc文件
在Linux上面对VIM编辑器的格式的设置通常可以提升工作效率,下面对工作机器上的.vimrc文件的内容进行一总结,以备后续的查询 set smarttab set tabstop=4 set shi ...
- ubuntu 配置vim(vimrc)
打开终端:ctrl+alt+t 进入vim文件:cd /etc/vim 打开vimrc文件:sudo gedit vimrc 然后在行末if语句前加上下面的内容," 这个符号为注释,后面内 ...
- vi/vim使用进阶: vimrc初步
本节所用命令的帮助入口: :help compatible :help mapleader :help map :help autocmd 当vim在启动时,如果没有找到vimrc或gvimrc,它缺 ...
- 我的vim配置文件.vimrc
我的vim配置文件.vimrc map <silent> <F10> :TlistToggle<cr>map <silent> <F8> : ...
- 我用的/etc/vimrc
" 映射非数字/字母键, 如:ctrl,shift, alt, home,end,功能键F1~F12, 要把这些键用尖括号括起来!如: map <F3> :NERDTree< ...
- .vimrc文件配置及航意
1. vimrc文件常见语句释义 设定 tab 的位置 :set tabstop=4 输入 tab 时自动将其转化为空格 :set expandtab ...
- Linux: .vimrc
set nuset autoindentset cindent"set tabstop=2"set shiftwidth=2set cursorlineset hlsearch&q ...
- vimrc配置文件_version1.0_+pathogen, taglist, wordcomplete插件说明
为了表示对Ruchee的感谢,首先这是Ruchee的个人网站:http://www.ruchee.com/index.html,他的以前很多的代码都放到Git里面了,里面有链接. 看了整整一天,刚开始 ...
随机推荐
- elasticsearch 了解多少,说说你们公司 es 的集群架构,索 引数据大小,分片有多少,以及一些调优手段 。
面试官:想了解应聘者之前公司接触的 ES 使用场景.规模,有没有做过比较大 规模的索引设计.规划.调优. 解答: 如实结合自己的实践场景回答即可. 比如:ES 集群架构 13 个节点,索引根据通道不同 ...
- 攻防世界baby_web
baby_web 题目提示想想初始页,但我们一访问就会跳转到1.php我们使用bp抓包分析,我们发送到repeater模块修改请求访问1.php内容看看 发现flag隐藏了我们去hex中看看 这样我们 ...
- 51单片机头文件reg51.h详解
转自:http://www.51hei.com/mcu/2670.html 我们在用c语言编程时往往第一行就是头文件,51单片机为reg51.h或reg52.h,51单片机相对来说比较简单,头文件里面 ...
- 体验javascript之美第五课 五分钟彻底明白 匿名函数自执行和闭包
通过文你将学到: 1.闭包是怎么回事儿? 2.闭包的原理和在jquery中的应用 3.从一到面试题彻底理解闭包和垃圾回收机制 4.闭包在jquery中的应用 概述 经常听到闭包这个词儿,或者匿名函数自 ...
- 微信小程序 使用filter过滤器几种方式
由于微信小程序 技术生态比较闭合,导致很多 现代前端框架很多积累出的成果都没有实现(可能未来会逐一实现). 用惯了现代 再耍小程序 总感觉很不顺手. 需要结果的请直接看最后的WXS View Filt ...
- 前端每日实战:144# 视频演示如何用 D3 和 GSAP 创作一个集体舞动画
效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/gdVObN 可交互视频 此视频是可 ...
- 前端面试题整理——手写AJAX
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 2022DASCTF X SU 三月春季挑战赛 ezpop
复现一道dactf的ezpop <?php class crow { public $v1; public $v2; function eval() { echo new $this->v ...
- 用Java编写的猜拳小游戏
学习目标: 熟练掌握各种循环语句 例题: 代码如下: // 综合案例分析,猜拳案例 // isContinue为是否开始游戏时你所输入的值 char isContinue; //y为开始,n为借宿 S ...
- react和react-dom是什么?
使用react开发网页的话,我们难免会下载两个包,一个是react,一个是react-dom,其中react是react的核心代码.react的核心思想是虚拟Dom,其实虚拟Dom改变没有那么复杂,简 ...