Chinaunix首页 | 论坛 | 博客
  • 博客访问: 426488
  • 博文数量: 123
  • 博客积分: 2686
  • 博客等级: 少校
  • 技术积分: 1349
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-23 22:11
文章分类
文章存档

2012年(3)

2011年(10)

2010年(100)

2009年(10)

我的朋友

分类: LINUX

2011-03-05 13:58:36

 

"设置菜单为英文
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set nocompatible  "关闭与VI的兼容
set nu!   "打开行号
set wrap       "自动折行
"开启语法高亮设置
if !exists("syntax_on")
syntax on
endif
set filetype=c      "设置默认语言为C
set tabstop=4       "设置tab距离为4
set softtabstop=4
set shiftwidth=4    "换行时行间交错使用4个空格
set expandtab
set cindent         "使用C语言的对齐方式
set smartindent     "智能对齐方式
set autoindent      "自动对齐,使用上一行的对齐方式
set ai!             "设置自动缩进
set nocp            "使可以使用backspace
set backspace=indent,eol,start  "使以前的字符也能使用backspace
set ignorecase      "搜索时不区分大小写  set noic为区分
map <C-S> :w <CR>   "设置Ctrl+S保存
"colorscheme darkgreen "主题颜色类型
set ruler           "在编辑过程中,在右下角显示光标位置的状态行
set showmatch       "设置匹配模式,类似当输入一个左括号时会匹配相应的那个右括号
set incsearch       "搜索自动定位
set hlsearch        "高亮搜索
set autochdir       "自动切换工作目录
set lines=38 columns=135 "设置窗口大小
set cmdheight=1     "设置cmd窗口的大小
set laststatus=2
set statusline=%F%m%r%h%w\ %{&ff}\ %y\ [A=\%03.3b,\ H=\%02.2B]%=%-14.(%l,%c%V%)[%p%%]
set nowrap
"自动载入 _vimrc,修改后不需要重启
autocmd! bufwritepost _vimrc source %

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" cscope setting

if has("cscope")
set csprg=/usr/bin/cscope              "指定用来执行 cscope 的命令
set csto=1                             "先搜索tags标签文件,再搜索cscope数据库
set cst                                "使用|:cstag|(:cs find g),而不是缺省的:tag
set nocsverb                           "不显示添加数据库是否成功
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out                   "添加cscope数据库
endif
"set csverb                             "显示添加成功与否
endif

nmap s :cs find s =expand("")
nmap g :cs find g =expand("")
nmap c :cs find c =expand("")
nmap t :cs find t =expand("")
nmap e :cs find e =expand("")
nmap f :cs find f =expand("")
nmap i :cs find i ^=expand("")$
nmap d :cs find d =expand("")




set nobackup


阅读(714) | 评论(0) | 转发(0) |
0

上一篇:Understand Qemu

下一篇:0 - Makefile

给主人留下些什么吧!~~