论坛首页 海阔天空论坛

vim编写代码没颜色高亮解决方案

浏览 3153 次
精华帖 (0) :: 良好帖 (0) :: 灌水帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-10-22  
最近开始学习linux,安装了简约的archlinux.
在arch下做ruby开发使用的是vim编辑器.可是使用后发现编写的代码没有加颜色高亮

通过google找到解决方案

在arch 下
/etc/vimrc
增加对 vim配置
syntax on #打开颜色高亮
set number #打开行号
set ts=2 #设置tab键



*如果没有响应,可能是没有vim的插件
可以通过 pacman 或者 yaourt获取
   发表时间:2011-10-22  
vim ~/.vimrc

set nocompatible
syntax on
set autoindent
set tabstop=4
set expandtab
colorscheme desert

set fileencoding=chinese
set fileencodings=ucs-bom,utf-8,chinese
set encoding=utf-8
set ambiwidth=double
set fileformat=unix
set fileformats=dos,unix,mac


0 请登录后投票
论坛首页 海阔天空版

跳转论坛:
Global site tag (gtag.js) - Google Analytics