runtime! debian.vim
"设置编码
set encoding=utf-
set fencs=utf-,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set fileencodings=utf-,ucs-bom,chinese "语言设置
set langmenu=zh_CN.UTF- "
command WQ wq
command Wq wq
command W w
command Q q
map <F5> i{<Esc>ea}<Esc>
map <F8> oprintf("bug!here is a bug!!!!\n");<Esc>
map <F4> <Esc>:wq<cr>
map <F7> oprintf("------------------------------------------------------------\n");<Esc> "设置语法高亮
syntax enable
syntax on "设置配色方案
colorscheme torte "可以在buffer的任何地方使用鼠标
set mouse=a
set selection=exclusive
set selectmode=mouse,key "高亮显示匹配的括号
set showmatch "去掉vi一致性
set nocompatible "设置缩进
set tabstop=
set softtabstop=
set shiftwidth=
set autoindent
set cindent
if &term=="xterm"
set t_Co=
set t_Sb=^[[%dm
set t_Sf=^[[%dm
endif "打开文件类型自动检测功能
filetype on "设置taglist
let Tlist_Show_One_File= "显示多个文件的tags
let Tlist_File_Fold_Auto_Close= "非当前文件,函数列表折叠隐藏
let Tlist_Exit_OnlyWindow= "在taglist是最后一个窗口时退出vim
let Tlist_Use_SingleClick= "单击时跳转
let Tlist_GainFocus_On_ToggleOpen= "打开taglist时获得输入焦点
let Tlist_Process_File_Always= "不管taglist窗口是否打开,始终解析文件中的tag " minibufexplorer
let g:miniBufExplMapWindowNavVim=
let g:miniBufExplMapWindowNavArrows=
let g:miniBufExplMapCTabSwitchBufs=
let g:miniBufExplModSelTarget=
let g:miniBufExplMoreThanOne= "
"设置WinManager插件
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
map <silent> <F9> :WMToggle<cr> "将F9绑定至WinManager,即打开WimManager "设置CSCOPE
set cscopequickfix=s-,c-,d-,i-,t-,e- "设定是否使用quickfix窗口显示cscope结果 "设置Grep插件
nnoremap <silent> <F3> :Grep<CR> "设置自动补全
filetype plugin indent on "打开文件类型检测
set completeopt=longest,menu "关掉智能补全时的预览窗口 "启动vim时如果存在tags则自动加载
if exists("tags")
set tags=./tags
endif "设置按F12就更新tags的方法
map <F12> :call Do_CsTag()<CR>
nmap <C-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :cs find c <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>:copen<CR>
nmap <C-@>f :cs find f <C-R>=expand("<cfile>")<CR><CR>:copen<CR>
nmap <C-@>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>:copen<CR>
nmap <C-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>:copen<CR>
function Do_CsTag()
let dir = getcwd()
if filereadable("tags")
if(g:iswindows==)
let tagsdeleted=delete(dir."\\"."tags")
else
let tagsdeleted=delete("./"."tags")
endif
if(tagsdeleted!=)
echohl WarningMsg | echo "Fail to do tags! I cannot delete the tags" | echohl None
return
endif
endif if has("cscope")
silent! execute "cs kill -1"
endif if filereadable("cscope.files")
if(g:iswindows==)
let csfilesdeleted=delete(dir."\\"."cscope.files")
else
let csfilesdeleted=delete("./"."cscope.files")
endif
if(csfilesdeleted!=)
echohl WarningMsg | echo "Fail to do cscope! I cannot delete the cscope.files" | echohl None
return
endif
endif if filereadable("cscope.out")
if(g:iswindows==)
let csoutdeleted=delete(dir."\\"."cscope.out")
else
let csoutdeleted=delete("./"."cscope.out")
endif
if(csoutdeleted!=)
echohl WarningMsg | echo "Fail to do cscope! I cannot delete the cscope.out" | echohl None
return
endif
endif if(executable('ctags'))
"silent! execute "!ctags -R --c-types=+p --fields=+S *"
silent! execute "!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q ."
endif if(executable('cscope') && has("cscope") )
if(g:iswindows!=)
silent! execute "!find . -name '*.h' -o -name '*.c' -o -name '*.cpp' -o -name '*.java' -o -name '*.cs' > cscope.files"
else
silent! execute "!dir /s/b *.c,*.cpp,*.h,*.java,*.cs >> cscope.files"
endif
silent! execute "!cscope -b"
execute "normal :" if filereadable("cscope.out")
execute "cs add cscope.out"
endif
endif
endfunction "设置默认shell
set shell=bash "设置VIM记录的历史数
set history= "设置当文件被外部改变的时侯自动读入文件
if exists("&autoread")
set autoread
endif "设置ambiwidth
set ambiwidth=double "设置文件类型
set ffs=unix,dos,mac "设置增量搜索模式
set incsearch "设置静音模式
set noerrorbells
set novisualbell
set t_vb= "不要备份文件
set nobackup
set nowb
set nu

my vimrc的更多相关文章

  1. 如何设置Vimrc

    .title { text-align: center } .todo { font-family: monospace; color: red } .done { color: green } .t ...

  2. vimrc

    我的vimrc https://github.com/juandx/vimrc 当然得装vundle git clone https://github.com/VundleVim/Vundle.vim ...

  3. Linux上 .vimrc文件

    在Linux上面对VIM编辑器的格式的设置通常可以提升工作效率,下面对工作机器上的.vimrc文件的内容进行一总结,以备后续的查询 set smarttab set tabstop=4 set shi ...

  4. ubuntu 配置vim(vimrc)

    打开终端:ctrl+alt+t 进入vim文件:cd /etc/vim 打开vimrc文件:sudo gedit vimrc 然后在行末if语句前加上下面的内容,"  这个符号为注释,后面内 ...

  5. vi/vim使用进阶: vimrc初步

    本节所用命令的帮助入口: :help compatible :help mapleader :help map :help autocmd 当vim在启动时,如果没有找到vimrc或gvimrc,它缺 ...

  6. 我的vim配置文件.vimrc

    我的vim配置文件.vimrc map <silent> <F10> :TlistToggle<cr>map <silent> <F8> : ...

  7. 我用的/etc/vimrc

    " 映射非数字/字母键, 如:ctrl,shift, alt, home,end,功能键F1~F12, 要把这些键用尖括号括起来!如: map <F3> :NERDTree< ...

  8. .vimrc文件配置及航意

    1.  vimrc文件常见语句释义 设定 tab 的位置          :set tabstop=4 输入 tab 时自动将其转化为空格          :set expandtab       ...

  9. Linux: .vimrc

    set nuset autoindentset cindent"set tabstop=2"set shiftwidth=2set cursorlineset hlsearch&q ...

  10. vimrc配置文件_version1.0_+pathogen, taglist, wordcomplete插件说明

    为了表示对Ruchee的感谢,首先这是Ruchee的个人网站:http://www.ruchee.com/index.html,他的以前很多的代码都放到Git里面了,里面有链接. 看了整整一天,刚开始 ...

随机推荐

  1. 安装完CentOS 7 后必做的七件事[转]

    CentOS是最多人用来运行服务器的 Linux 版本,最新版本是 CentOS 7.当你兴趣勃勃地在一台主机或 VPS 上安装 CentOS 7 后,首要的工作肯定是加强它的安全性,以下列出的七件事 ...

  2. Zabbix微信个人账号告警

    前言: 最近研究zabbix告警,网上看了帖子有各式各样姿势:电话语音告警,邮件告警,短信告警,微信公众号告警等等等..姿势五花八门,真是纠结. 电话语音告警,短信告警首先pass 前者花钱,后者通过 ...

  3. types.MethodType

    http://stackoverflow.com/questions/972/adding-a-method-to-an-existing-object-instance 532down voteac ...

  4. 光流算法:关于OpenCV读写middlebury网站给定的光流的代码

    Middlebury是每个研究光流算法的人不可能不使用的网站,Middlebury提供了许多标准的测试库,这极大地推进了光流算法的进展.Middlebury提供的标准库,其计算出的光流保存在后缀名为. ...

  5. nyoj 103 A + B problem II

    点击打开链接 A+B Problem II 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述 I have a very simple problem for you. G ...

  6. (easy)LeetCode 235.Lowest Common Ancestor of a Binary Search Tree

    Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...

  7. [POJ 2923] Relocation (动态规划 状态压缩)

    题目链接:http://poj.org/problem?id=2923 题目的大概意思是,有两辆车a和b,a车的最大承重为A,b车的最大承重为B.有n个家具需要从一个地方搬运到另一个地方,两辆车同时开 ...

  8. Unable to open serial port /dev/ttyUSB0

    ubuntu12.04使用USB转串口时出现权限不够问题,如下 Unable to open serial port /dev/ttyUSB0 权限不够 解决办法: 通过增加udev规则来实现.步骤如 ...

  9. Android——显示单位px和dip以及sp的区别

    dip: device independent pixels(设备独立像素). 不同设备有不同的显示效果,这个和设备硬件有关,一般我们为了支持WVGA.HVGA和QVGA 推荐使用这个,不依赖像素.d ...

  10. sqlserver 常用sql语句

    SELECT COUNT(*) FROM WeixinUser SELECT COUNT(*) FROM WeixinUser WHERE datediff(day, CreateTime,getda ...