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 ...
随机推荐
- php 快速fork出指定个子进程
$pids = array(); $child_pid = pcntl_fork(); if ($child_pid == -1) { throw new Exception( __METHOD__ ...
- python(21)实现多进程
参考链接:http://www.cnblogs.com/kaituorensheng/p/4445418.html python多进程:multiprocessing python中的多线程其实并不是 ...
- JQuery之DataTables强大的表格解决方案
1.DataTables的默认配置 $(document).ready(function() { $('#example').dataTable(); } ); 示例:http://www.guoxk ...
- ubuntu安装mysql5.7
sudo apt-get updatesudo apt-get upgradesudo apt-get install mysql-server mysql-client #自动安装会装上5.7的 ...
- 强大的JS数组
1.数组的创建 var arrayObj = new Array(); //创建一个数组 var arrayObj = new Array([size]); //创建一个数组并指定长度,注意不是上限, ...
- Jmeter html 报告中添加90% line time
转载南风_real博客园:http://www.cnblogs.com/jaychang/p/5784882.html 首先上效果图: 其次明白几个原理: 90% Line的意思是:一组数由小到大进行 ...
- Linux自启动
linux 下tomcat开机自启动修改Tomcat/bin/startup.sh 为:export JAVA_HOME=/usr/java/j2sdk1.4.2_08export CLASSPATH ...
- install httpd
tar -zxvf httpd-2.4.4.tar.gzcd httpd-2.4.4./configure --prefix=/apache/home/openfire/httpd24checking ...
- Android系统下的动态Dex加载
1 问题在Android系统中,一个App的所有代码都在一个Dex文件里面.Dex是一个类似Jar的存储了多有Java编译字节码的归档文件.因为Android系统使用Dalvik虚拟机,所以需要把使用 ...
- 交易Txt文件导出
private void writeFYFileToTxt(List list, HttpServletRequest request, String drxh, FileOutputStream f ...