win10/win7下不通过winmanager整合NERDTree和Tagbar的gVim8.0配置
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
注:图片来自作者公众号——“iKM_2018”,亦即“丫丫的iKM基地”。
" Startup {{{
filetype indent plugin on
" vim 文件折叠方式为 marker
augroup ft_vim
au!
au FileType vim setlocal foldmethod=marker
augroup END
"光标遇到折叠,折叠就打开,否则输入zo
set foldopen=all
"移开折叠时自动关闭折叠,否则输入zc
set foldclose=all
" }}}
" gvimrc_example {{{
" An example for a gvimrc file.
" The commands in this are executed when the GUI is started, after the vimrc
" has been executed.
"
" Maintainer: Bram Moolenaar Bram@vim.org
" Last change: 2016 Apr 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.gvimrc
" for Amiga: s:.gvimrc
" for MS-DOS and Win32: $VIM_gvimrc
" for OpenVMS: sys$login:.gvimrc
" Make external commands work through a pipe instead of a pseudo-tty
"set noguipty
" set the X11 font to use
" set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
set ch=2 " Make command line two lines high
set mousehide " Hide the mouse when typing text
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
" Only do this for Vim version 5.0 and later.
if version >= 500
" Switch on syntax highlighting if it wasn't on yet.
if !exists("syntax_on")
syntax on
endif
" For Win32 version, have "K" lookup the keyword in a help file
"if has("win32")
" let winhelpfile='windows.hlp'
" map K :execute "!start winhlp32 -k <cword> " . winhelpfile <CR>
"endif
" Set nice colors
" background for normal text is light grey
" Text below the last line is darker grey
" Cursor is green, Cyan when ":lmap" mappings are active
" Constants are not underlined but have a slightly lighter background
highlight Normal guibg=grey90
highlight Cursor guibg=Green guifg=NONE
highlight lCursor guibg=Cyan guifg=NONE
highlight NonText guibg=grey80
highlight Constant gui=NONE guibg=grey95
highlight Special gui=NONE guibg=grey95
endif
" }}}
" General {{{
" 语法高亮
syntax enable
syntax on
" 配色设置:http://ethanschoonover.com/solarized
if has('gui_running')
set background=dark
else
set background=light
endif
let g:solarized_termcolors=256
let g:solarized_termtrans=1
colorschem solarized
" 其他配置
set nocompatible " 关闭 vi 兼容模式
set guifont=Inconsolata:h12:cANSI " 设置字体
set number " 显示行号
set cursorline " 突出显示当前行
set ruler " 打开状态栏标尺,即打开光标的行列位置显示功能
set tabstop=4 " 设定 tab 长度为 4
set nobackup " 覆盖文件时不备份
set autochdir " 自动切换当前目录为当前文件所在的目录
set ignorecase smartcase " 搜索时忽略大小写,但在有一个或以上大写字母时仍保持对大小写敏感
set incsearch " 输入搜索内容时就显示搜索结果
set hlsearch " 搜索时高亮显示被找到的文本
" set guioptions-=T " 隐藏工具栏
" set guioptions-=m " 隐藏菜单栏
set smartindent " 开启新行时使用智能自动缩进
set laststatus=2 " 显示状态栏 (默认值为 1, 无法显示状态栏)
set ambiwidth=double " 显示中文引号
set cursorline " 行高亮
set cursorcolumn " 列高亮,与函数列表有冲突
nnoremap <F2> :g/^\s*$/d<CR>
set clipboard+=unnamed
"解决菜单乱码
set encoding=utf-8
"fileencodings需要注意顺序,前面的字符集应该比后面的字符集大
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set langmenu=zh_CN.utf-8
set imcmdline
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决consle输出乱码
language messages zh_CN.utf-8
" }}}
" plugins {{{
" miniBufExpl
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:miniBufExplMoreThanOne=0
" #######################################################################################################
" F3,F4,F4,F3,F3,打开后按此顺序连续反复几次,即可让Tagbar和NERDTree上下排列在左边窗口
" 打开非Tagbar自动打开的文件(如_vimrc)后光标在Tree窗口,单按F3有时也可达到上述效果
" 两者都自动打开时,按此顺序:F4,F4,F3,F3(即先关掉NERDTree—F4,再打开NERDTree—F4,最后连续按两次F3)
" #######################################################################################################
" Tagbar
map <F3> :TagbarToggle<CR>
let g:tagbar_left = 1
let g:tagbar_vertical = 30
let g:tagbar_sort = 0 "close the sort
autocmd BufReadPost .cpp,.c,.h,.hpp,.cc,.py call tagbar#autoopen()
" NERDTree
map <F4> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif
autocmd vimenter * NERDTree
" ctrlp
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
" 自动补全插件 jedi-vim
let g:SuperTabDefaultCompletionType = "context"
let g:jedi#popup_on_dot = 0
" python 语法检测之ale
let g:ale_linters = {'python': ['flake8'], 'reStructuredText': ['rstcheck']}
let g:ale_fixers = {'python': ['remove_trailing_lines', 'trim_whitespace', 'autopep8']}
" }}}
" python {{{
"Pydiction
" ------------------------------------------------------------------------
let g:pydiction_location = 'D:\gVim\vim\vim80\ftplugin\complete-dict'
let g:pydiction_menu_height = 20
autocmd FileType python map <F5> :!python %<CR>
" noocomplete 自动补全插件,官方配置
" ------------------------------------------------------------------------
set completeopt=longest,menu
"Note: This option must be set in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)!
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3
" Define dictionary.
let g:neocomplete#sources#dictionary#dictionaries = {
\ 'default' : '',
\ 'vimshell' : $HOME.'/.vimshell_hist',
\ 'scheme' : $HOME.'/.gosh_completions'
\ }
" Define keyword.
if !exists('g:neocomplete#keyword_patterns')
let g:neocomplete#keyword_patterns = {}
endif
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
" Plugin key-mappings.
inoremap <expr><C-g> neocomplete#undo_completion()
inoremap <expr><C-l> neocomplete#complete_common_string()
" Recommended key-mappings.
" <CR>: close popup and save indent.
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function()
return (pumvisible() ? "<C-y>" : "" ) . "<CR>"
" For no inserting <CR> key.
"return pumvisible() ? "<C-y>" : "<CR>"
endfunction
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "<C-n>" : "<TAB>"
" <C-h>, <BS>: close popup and delete backword char.
inoremap <expr><C-h> neocomplete#smart_close_popup()."<C-h>"
inoremap <expr><BS> neocomplete#smart_close_popup()."<C-h>"
" Close popup by <Space>.
"inoremap <expr><Space> pumvisible() ? "<C-y>" : "<Space>"
" AutoComplPop like behavior.
"let g:neocomplete#enable_auto_select = 1
" Shell like behavior(not recommended).
"set completeopt+=longest
"let g:neocomplete#enable_auto_select = 1
"let g:neocomplete#disable_auto_complete = 1
"inoremap <expr><TAB> pumvisible() ? "<Down>" : "<C-x><C-u>"
" Enable omni completion.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
" Enable heavy omni completion.
if !exists('g:neocomplete#sources#omni#input_patterns')
let g:neocomplete#sources#omni#input_patterns = {}
endif
"let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w|\h\w::'
"let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]%(.|->)'
"let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] \t]%(.|->)|\h\w::'
" For perlomni.vim setting.
" https://github.com/c9s/perlomni.vim
let g:neocomplete#sources#omni#input_patterns.perl = '\h\w->\h\w|\h\w*::'
" }}}
win10/win7下不通过winmanager整合NERDTree和Tagbar的gVim8.0配置的更多相关文章
- win10/win7下vs2013自带IISExpress支持局域网访问
打开IISExpress安装目录(C:\Users\Administrator\Documents\IISExpress\config),一般为我的文档下,用记事本打开applicationhost. ...
- 最详细win7下手动搭建PHP环境:apache2.4.23+php7.0.11
♣资源下载(apache24,php7,phpStorm9) ♣修改apache24配置文件 ♣安装和启动Apache服务 ♣修改php7.0.11配置文件 配置前说明:电脑需要有vc运行库环境,否则 ...
- win7下安装Office2010老是出现提示安装MSXML6.10.1129.0,下载官方MSXML后提示安装成功却也安装不了
在注册表中增加以下信息: [HKEY_CLASSES_ROOT\TypeLib\{F5078F18-C551-11D3-89B9-0000F81FE221}][HKEY_CLASSES_ROOT\Ty ...
- win7下使用Taste实现协同过滤算法
如果要实现Taste算法,必备的条件是: 1) JDK,使用1.6版本.需要说明一下,因为要基于Eclipse构建,所以在设置path的值之前要先定义JAVA_HOME变量. 2) Maven,使用2 ...
- 【我是老中医】Win10系统下MATLAB无法正常打开的解决方案
转眼大四了,要开始做毕设了,导师给的题目要用到他之前做的东西,都是MATLAB做的,所以不太熟悉MATLAB的我也得用这玩意儿了,想想自己目前也就大二的DSS实验和大三的AI实验用过MATLAB,当时 ...
- [转]让程序不触发 Vista/Win7下应用程序兼容性助手弹出 .
原文地址 http://blog.csdn.net/maxuhuiabc/article/details/6081874 在Vista/Win7下 运行一个 exe 应用程序后,系统经常弹出 兼容性助 ...
- vim使用winmanager整合nerd tree和taglist
winmanager插件安装 • 插件简介 winmanager is a plugin which implements a classical windows type IDE in Vim-6. ...
- Win10 Anaconda下TensorFlow-GPU环境搭建详细教程(包含CUDA+cuDNN安装过程)(转载)
win7(win10也适用)系统安装GPU/CPU版tensorflow Win10 Anaconda下TensorFlow-GPU环境搭建详细教程(包含CUDA+cuDNN安装过程) 目录 2.配置 ...
- win10 x64下的DNW驱动不完全安装方法【转】
本文转载自:https://blog.csdn.net/sihaiwenshu/article/details/52503550 一.起因 最新心血来潮想学ARM,JZ2440开发板买回来后就开始折腾 ...
随机推荐
- 以List为例浅谈C#的学习方法
前言:关于学习方法的讨论其实是个比较模糊的概念,对于List的介绍的资料其实已经很多了,但是一般是介绍List本身,我打算分享的是,以温故List为例,来获取新知识的这么一个过程.这里的新知识也不是什 ...
- 【java】对象克隆protected Object clone() throws CloneNotSupportedException
package 对象克隆; class A implements Cloneable{//要具备clone()功能必须要实现Cloneable接口,此接口里无方法,只起标识作用. private St ...
- iOS Label 自适应高度
推荐第二个 测试一,只改变numberOfLines属性,label的高度不会自适应(会有text中的一部分内容称为......) NSString *str = @"jgreijgirje ...
- 小白的Python之路 day4 迭代器
迭代器 学习前,我们回想一下可以直接作用于for循环的数据类型有以下几种: 1.集合数据类型,如list.tuple.dict.set.str等: 2.是generator,包括生成器和带yield的 ...
- lesson - 8 Linux文档的压缩和打包
内容概要:1. gzip工具语法: gzip [-d#] filename 其中#为1-9的数字,默认压缩级别为6 只能压缩文件gzip filename 生成filename.gz 源文件消失解压 ...
- Windows 7下将Tomcat Java程序设置为Windows Service
可以参看以下资料: https://jingyan.baidu.com/article/b2c186c89f5127c46ef6ff08.html http://tomcat.apache.org/t ...
- unity demo之坦克攻击
先展示一下成果吧,节后第一天上班简直困爆了,所以一定要动下脑子搞点事情. 分析: 1.涉及到的游戏对象有:坦克,摄像机,场景素材(包含灯光),子弹 2.坦克具有的功能:移动,旋转,发射子弹,记录生命值 ...
- vue-router源码学习(一)
因为v3.01版本中的 /src代码使用TypeScript进行书写,我这里仅仅用作模块学习, 具体学习的还是 /dist/vue-router.js 代码. (一)基本使用方式 JS代码 // ...
- volatile关键字的特性总结
当一个变量定义为volatile后,它将具备两个特性: 1.保证此变量对所有线程的可见性,所谓"可见性",,是指当一个线程修改了这个变量的值,新值对于其他线程来说是可以立即得知的. ...
- eclipse环境下日志打印输出
1.先将jdk配置一下 选Preferences---- 找到自己的jdk所在的位置 2.配置Tomcat window-----preferences------- 找到自己的tomcat所在位置 ...