[原创]偶的Vimrc配置文件
-
- 帖子: 57
- 注册时间: 2008-12-13 6:41
Re: [原创]偶的Vimrc配置文件
没有一句注释,只能给你一个人看
- 荒野无灯
- 帖子: 84
- 注册时间: 2009-08-11 14:16
- 来自: http://www.ihacklog.com
- 联系:
- bobo4548
- 帖子: 661
- 注册时间: 2007-07-17 22:52
- 来自: cn,shandong
Re: [原创]偶的Vimrc配置文件
好用的编辑器,真实很强大阿
- cnchyan
- 帖子: 106
- 注册时间: 2005-06-19 23:33
Re: [原创]偶的Vimrc配置文件
楼主也是潜水健将啊!幸会,幸会
Ubuntu Karmic
acer 5595 : core2 duo T7200;2*1024M DDR2-667 ;intel 965pm;ati mobility readon X1600
贫贱不能移,富贵不能淫,威武不能屈
acer 5595 : core2 duo T7200;2*1024M DDR2-667 ;intel 965pm;ati mobility readon X1600
贫贱不能移,富贵不能淫,威武不能屈
-
- 帖子: 407
- 注册时间: 2006-07-28 8:51
Re: [原创]偶的Vimrc配置文件
我也发份我的吧,方便大家使用。
代码: 全选
"不启动VI兼容模式
set nocp
"打开插件选项和自动对齐选项
filetype plugin indent on
"设置tab为4个空格
set ts=4 et
set shiftwidth=4
set softtabstop=4
"设置补全的弹出式菜单样式为longest,menu
set completeopt=longest,menu
"设置窗口大小
"set lines=43 columns=150
"设置GUI字体
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
"设置文件格式,优先尝试,UNIX,DOS
set fileformats=unix,dos
"设置文件编码,如果当多字节可用时:
"设置默认编码为UTF-8,最终文件编码为utf-8,编码尝试列表为中文,日文,UTF16
if has("multi_byte")
set encoding=utf8
set fileencoding=utf8
set fileencodings=gbk,japanese,utf-8,utf-16
endif
"设置搜索高亮显示
set hlsearch
"copen 1
"设置VIM关键字补全查找路径
set path+=/usr/src/linux/include/,/usr/src/linux/arch/x86/include/,/usr/include/gtk-2.0/
"设置ctags的路径
set tags+=~/.vim/tags
"设置代码结构查看器tlist
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
"设置代码查看器cscope的快捷方式
set cscopequickfix=s-,c-,d-,i-,t-,e-
"允许自动对齐
set autoindent
"设置自动跳转到当前目录(仅CUI可以使用)
set autochdir
"不创建备份文件(~文件)
set nobackup
"执行命令时显示命令内容
set showcmd
"设置X下的自动跳转到当前目录
autocmd BufReadPost * cd %:p:h
"打开标尺(重来没有看到过实物)
"set ruler
"不自动硬换行
"set nolinebreak
"显示行号
set nu
"打开语法加亮
syntax on
"设置颜色主题为torte(一种北京为黑色的主题,很好不伤眼睛)
colorsc torte
"设置普通模式下的,键盘映射 CTRL+C为复制到剪贴板
map <C-c> "+y
"设置普通模式下的,键盘映射 CTRL+X为剪切到剪贴板
map <C-x> "+x
"设置普通模式下的,键盘映射 CTRL+V为从剪贴板粘贴
map <C-v> "+gP
"配置插入模式
"键盘映射 CTRL+C为复制到剪贴板
imap <C-c> <ESC>"+y<insert>
"键盘映射 CTRL+X为剪切到剪贴板
imap <C-x> <ESC>"+x<insert>
"键盘映射 CTRL+V为从剪贴板粘
imap <C-v> <space><ESC>"+gP<insert><delete>
"配置automake F4为automake
map <F4> :! ~/bin/compl_script.sh<CR>
"配置编译快捷键为F5
map <F5> : mak!<CR>
"配置TAGLIST快捷键为F7
map <F7> : Tlist<CR>
"配置cscope 代码查看器相关
if has("cscope")
set csprg=/usr/bin/cscope
set csto=1
set cst
set nocsverb
"添加cscope的代码数据库
cs add ~/.vim/cscope.out
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
endif
set csverb
"nmap <C-[> <C-t>
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><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>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
endif
-
- 帖子: 58
- 注册时间: 2009-10-23 23:46
Re: [原创]偶的Vimrc配置文件
上楼的,cc了你的给我用下先。懒得写谢谢