ubuntu16.04 C++ 编程环境配置

ubuntu16.04 安装vim

安装vim时会出现报错,这时修改软件源。把软件源修改为国内源和更新。详见https://www.cnblogs.com/flyinggod/p/7979108.html
https://www.cnblogs.com/flyinggod/p/7979108.html

root@ubuntu:/home/chenchen# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

安装好vim以后,要想界面好看需要配置一下:

sudo vim /etc/vim/vimrc

打开配置文件以后加入以下句子

syntax on                       //语法高亮
set nu                           // 在左侧行号
set tabstop=4                  //tab 长度设置为 4
set nobackup               //覆盖文件时不备份
set cursorline               //突出显示当前行
set ruler                       //在右下角显示光标位置的状态行
set autoindent             //自动缩进

你可能感兴趣的:(C++)