vim的.vimrc文件设置
set nocompatible
set autowrite
set autoread
set nobackup
set noswapfile
" --- syntax and indent ---
syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set smartindent
set cindent
set expandtab
set nolinebreak
set showmatch
set wrap
" ---editing setting ---
set backspace=2 "use backspace key to delete in insert mode
" ---encoding---
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb2312,gb18030,big5,euc-jp,euc-kr,latin1
set fileencoding=utf-8
set termencoding=utf-8
" ---fileformat---
set ffs=unix,dos,mac
set ff=unix
colorscheme desert
"set columns=120
set number
" statusline
set laststatus=2
set statusline=%f\ %m%y[%{&ff}:%{&fenc}]%=%10.(\ %l,%c%V%)\ %5.(%P%)
filetype on
filetype plugin on
set mouse=a
"---find and substitute ---
set incsearch
set hlsearch
set ignorecase
set sm
" set colors when column is great than 90
"set textwidth=90
"set wrapmargin=90
"au BufWinEnter * let w:m1=matchadd('Search', '\%<101v.\%>90v', -1)
"au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>100v.\+', -1)
"au BufWinLeave * call clearmatches()
"---ctags setting---
set path=.,/usr/include/,/usr/local/include
map <F11> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
set tags+=~/.vim/tag/cpp
set tags+=~/.vim/tag/google
"---Tlist setting---
let Tlist_Ctags_Cmd='ctags'
let Tlist_Use_Right_Window=0
let Tlist_Show_One_File=1
let Tlist_File_Fold_Auto_Close=0
let Tlist_Exit_OnlyWindow=1
let Tlist_Process_File_Always=1
let Tlist_WinHeight=100
let Tlist_WinWidth=24
let Tlist_Inc_WinWidth=0
"---acp setting---
let g:acp_completeoptPreview = 0
"---omni setting---
" 按下F3自动补全代码,注意该映射语句后不能有其他字符,包括tab;否则按下F3会自动补全一些乱码
imap <F3> <C-X><C-O>
" 按下F2根据头文件内关键字补全
imap <F2> <C-X><C-I>
set completeopt=menu,menuone " 关掉智能补全时的预览窗口
let OmniCpp_MayCompleteDot = 1 " autocomplete with .
let OmniCpp_MayCompleteArrow = 1 " autocomplete with ->
let OmniCpp_MayCompleteScope = 1 " autocomplete with ::
let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert)
let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files
let OmniCpp_ShowPrototypeInAbbr = 1 " show function prototype in popup window
let OmniCpp_GlobalScopeSearch=1 " enable the global scope search
let OmniCpp_DisplayMode=1 " Class scope completion mode: always show all members
let OmniCpp_DefaultNamespaces=["std","_GLIBCXX_STD"]
let OmniCpp_ShowScopeInAbbr=1 " show scope in abbreviation and remove the last column
let OmniCpp_ShowAccess=1
"---bufexploerr seting---
let g:bufExplorerDefaultHelp=0       " Do not show default help.
let g:bufExplorerShowRelativePath=1  " Show relative paths.
let g:bufExplorerSortBy='mru'        " Sort by most recently used.
let g:bufExplorerSplitRight=0        " Split left.
let g:bufExplorerSplitVertical=1     " Split vertically.
let g:bufExplorerSplitVertSize = 40  " Split width
let g:bufExplorerUseCurrentWindow=1  " Open in new window. 
autocmd BufWinEnter \[Buf\ List\] setl nonumber
"---project setting---
let g:proj_flags="imstFST"
"---WinManager :WMToggle---
let g:winManagerWindowLayout='FileExplorer,BufExplorer|TagList'
let g:winManagerWidth=30
let g:defaultExplorer=0
nmap wm :WMToggle<CR>
"---protobuf---
augroup filetype
    au! BufRead,BufNewFile *.proto setfiletype prototype
augroup end
vim的.vimrc文件设置的更多相关文章
- vim 配置.vimrc文件
		
下面这个.vimrc文件是根据公司里的一个前辈配置的,这里记录下,方便以后使用.它的功能,其实跟网上很多.vimrc配置的相比,还是小儿科.我记录下来,主要还是因为自己已经习惯了这个工作环境跟快捷键. ...
 - 个人vim配置(.vimrc文件分享)
		
syntax enable syntax on colorscheme desert set nu! set nowrap set nobackup set backspace= set tabsto ...
 - ubuntu 配置vim(vimrc)
		
打开终端:ctrl+alt+t 进入vim文件:cd /etc/vim 打开vimrc文件:sudo gedit vimrc 然后在行末if语句前加上下面的内容," 这个符号为注释,后面内 ...
 - linux 配置vim(vimrc)
		
打开终端:ctrl+alt+t 进入vim文件:cd /etc/vim 打开vimrc文件:sudo gedit vimrc 然后在行末if语句前加上下面的内容," 这个符号为注释,后面内 ...
 - Vim的行号、语法显示等设置(.vimrc文件的配置)以及乱码解决
		
在终端下使用vim进行编辑时,默认情况下,编辑的界面上是没有显示行号.语法高亮度显示.智能缩进 等功能的.为了更好的在vim下进行工作,需要手动设置一个配置文件:.vimrc.在启动vim时,当前用户 ...
 - Vim插件及.vimrc文件的配置
		
关于Vim的配置基本是在.vimrc文件中完成的,该文件一般放在用户目录下. 今天安装了插件管理器Pathogen和python自动补全的插件pydiction,其中Pathogen需要事先创建两个文 ...
 - Vim默认保存文件路径的设置
		
在_vimrc文件中添加: exec 'cd ' . fnameescape('F:\') F:\ 换成自己所需的路径,这样在vim中新建文件后直接用命令“ :w 文件名”就可以自动保存到已定义的路径 ...
 - VIM技巧, .vimrc文件
		
将 .vimrc文件上传到用户家目录下 文件内容如下: autocmd BufNewFile *.py,*.cc,*.sh,*.java exec ":call SetTitle()&quo ...
 - Linux上 .vimrc文件
		
在Linux上面对VIM编辑器的格式的设置通常可以提升工作效率,下面对工作机器上的.vimrc文件的内容进行一总结,以备后续的查询 set smarttab set tabstop=4 set shi ...
 
随机推荐
- JS的Data类型格式化(转)
			
// 对Date的扩展,将 Date 转化为指定格式的String // 月(M).日(d).小时(h).分(m).秒(s).季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占 ...
 - 如何实现多个div水平均匀排列且量两端贴壁
			
下面先看一段代码实例: <!DOCTYPE html><html><head><meta charset=" utf-8">< ...
 - Async/Await - Best Practices in Asynchronous Programming z
			
These days there’s a wealth of information about the new async and await support in the Microsoft .N ...
 - mybatis的动态sql
			
案例一: insert语句,然后获取这条语句的id值. <insert id="insertBook" parameterType="modle.Book" ...
 - inno setup 执行SQL
			
参考之:1.可将导入数据的功能写入一个小程序,再外部调用(楼上已经说了):2.可用程序代码:[Setup] AppName=科發醫院管理系統 AppVerName=科發醫院管理系統4.0 AppPub ...
 - C++primer练习14.44
			
编写一个简单的桌面计算器使其处理二元运算 // 14_44.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iost ...
 - select into from 和 insert into select 的用法和区别
			
select into from 和 insert into select都是用来复制表,两者的主要区别为: select into from 要求目标表不存在,因为在插入时会自动创建.insert ...
 - OS X 升级 Yosemite 后,Intellij IDEA 与 VirtualBox 启动失败
			
报错: Dyld Error Message: Symbol not found: _CGContextSetAllowsAcceleration Referenced from: /Library/ ...
 - 翻译:为 URL Rewrite 模块创建重写规则
			
原文名称:Creating Rewrite Rules for the URL Rewrite Module 原文地址:http://www.iis.net/learn/extensions/url- ...
 - git 仓库操作
			
一.git 仓库从远程clone 首先要建立一个本地空目录文件比如 RuntimeJsonModel,然后: 1. git init 2. git clone https://github.com/G ...