---
title: "vim一些简单记录"
author: "chenchao051"
date: "2013-05-31T14:22:10Z"
tags: []
categories: ["编程语言"]
slug: "vim"
draft: false
lastmod: "2013-12-13T09:29:58Z"
id: 1880574
url: "https://crazyjvm.iteye.com/blog/1880574"
---

mac在/usr/share/vim/vimrc linux在/etc/vimrc

 

1、问：后退键不能删除数据，不能往后退怎么办？

      答：在vimrc中加入set backspace=2

 

2、问：如何控制tab键的缩进？

      答：在vimrc中加入set tabstop=4 (任何你想要缩进的字符数)

 

3、问：如何在mac的vim中开启语法高亮

      答:  在/usr/share/vim/vimrc后加上 syntax on

 

4、问：如何切换lang到utf8

      答：在/etc/profile中加入以下语句：

              LANG=zh\_CN.UTF-8

              LC\_LOCALE=zh\_CN.UTF-8