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 ...
随机推荐
- MST_kruskal
kruskal是求最小生成树的算法. 首先,kruskal就是把所有边按照权值从小到大的顺序排列,这一步可以直接使用sort,然后依次考查每一条边,设w=(u,v)表示从u到v的一条边的权值为w,则有 ...
- [实变函数]4.1 可测函数 (measurable function) 及其性质
1 记号 (notations) (1) 广义实数: $\overline{\bbR}=\bbR\cup\sed{-\infty}\cup\sed{+\infty}$. (2) 本章主要考虑 ...
- Eclipse中构建Fluent风格到Formatter
The place to set this is on the "Line Wrapping" tab of the code formatting preferences pag ...
- i++与++i 辨析
i++:先赋值在自加: ++i:先自加在赋值: 备注:在赋值运算中有区别,单独使用没有区别 ( 例子1:单独使用 for(int i=0;i<10;i++){ } for(int i=0;i&l ...
- How To Easily Call WCF Services Properly z
Please note: this article has been superceded by the documentation for the ChannelAdam WCF Library. ...
- ruby-rails 环境搭建
https://ruby-china.org/wiki/install_ruby_guide
- PDF出力相关资料
http://itext.2136553.n4.nabble.com/iText-SetFieldProperty-method-not-working-for-some-parameters-set ...
- NLog文章系列——如何配置NLog(转)
NLog使用方法 作者:Jaros?aw Kowalski <> 翻译:CrazyCoder(由衷感谢他的热心!!) 原文:http://www.nlog-project.org/conf ...
- 大容量导入和导出 XML 文档的示例
示例表 若要测试示例 A,必须创建示例表 T. USE tempdb CREATE TABLE T (IntCol int, XmlCol xml); GO 示例数据文件 在运行示例 A 之前,必 ...
- [POJ 2063] Investment (动态规划)
题目链接:http://poj.org/problem?id=2063 题意:银行每年提供d种债券,每种债券需要付出p[i]块钱,然后一年的收入是v[i],到期后我们把本金+收入取出来作为下一年度本金 ...