免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2133 | 回复: 3
打印 上一主题 下一主题

老手们提供一个好用的vim配置文件如何? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-22 11:35 |只看该作者 |倒序浏览
升级了系统,配置文件没有了。而且对代码高亮的颜色不是很满意

老手们能不能给提供个vim配置文件?
在此先谢过了哈

论坛徽章:
0
2 [报告]
发表于 2009-07-22 13:57 |只看该作者
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
   set fileencodings=utf-8,latin1
endif
set nu
syntax on
set tabstop=2  " Set default tab width to 4, default is 8
set nocompatible " Use Vim defaults (much better!)
set bs=2  " allow backspacing over everything in insert mode
"set ai   " always set autoindenting on
"set backup  " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
   " than 50 lines of registers
set history=50  " keep 50 lines of command line history
set ruler  " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
  " In text files, always limit the width of text to 78 characters
  autocmd BufRead *.txt set tw=78
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost *
  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  \   exe "normal! g'\"" |
  \ endif
endif
if has("cscope") && filereadable("/usr/bin/cscope")
   set csprg=/usr/bin/cscope
   set csto=0
   set cst
   set nocsverb
   " add any database in current directory
   if filereadable("cscope.out")
      cs add cscope.out
   " else add database pointed to by environment
   elseif $CSCOPE_DB != ""
      cs add $CSCOPE_DB
   endif
   set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif
if &term=="xterm"
     set t_Co=8
     set t_Sb=[4%dm
     set t_Sf=[3%dm
endif
set gfn=Monospace\ 12

论坛徽章:
0
3 [报告]
发表于 2009-07-22 14:25 |只看该作者

回复 #2 airhello 的帖子

谢谢楼上了呵

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
4 [报告]
发表于 2009-07-22 14:49 |只看该作者
原帖由 Logic0 于 2009-7-22 11:35 发表
升级了系统,配置文件没有了。而且对代码高亮的颜色不是很满意

老手们能不能给提供个vim配置文件?
在此先谢过了哈

Vim 自己带的那个就挺好,/usr/share/vim/vim70/vimrc_example.vim
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP