Linux基础(Ubuntu16.04):安装vim及配置
1.进入终端 Ctrl + Alt +T 出现终端窗口
2.输入命令: sudo apt-get install vim-gtk
3.验证是否成功
安装完vim后查看命令 vi tab键,就会关联出所有vi开头的命令,看是否有vim,有则成功.
4.美化vim
输入命令:sudo vim /etc/vim/vimrc
注意: 必须加上sudo,否则你是没有权限编辑vimrc的。
在这个文件中可以看到有下面这个if判断,意思是语法高亮,如果是被注释掉状态,可以将其放开:
if has("syntax")
syntax on
endif
然后在VIM的最后一行,输入下面这些内容:
"设置左侧行号
set nu
"设置tab键长度为4
set tabstop=
"突出显示当前行
set cursorline
"在右下角显示光标位置的状态行
set ruler
"自动缩进
set autoindent
"覆盖文件时不备份
set nobackup
编辑完成后使用 :wq 进行保存退出
说明: 冒号结束编辑 ,w为保存 q为退出 如果你想放弃也可以 q!为强制退出
Linux基础(Ubuntu16.04):安装vim及配置的更多相关文章
- Ubuntu16.04安装Redis并配置
Ubuntu16.04安装Redis并配置 2018年05月22日 10:40:35 Hello_刘 阅读数:29146 Ubuntu16.04安装Redis并配置 1):安装: 1:终端命令下载 ...
- ubuntu16.04和vim的配置与美化
目录 ubuntu16.04配置 ubuntu16.04 美化 vim配置 vim美化 ubuntu16.04配置 安装vim sudo apt-get install vim-gnome 换源 su ...
- Ubuntu 12.04安装vim和配置
问题: ubuntu默认没有安装vim,出现: jyg@ubuntu:~$ vim test.cThe program 'vim' can be found in the following pack ...
- Linux (Ubuntu 18.04) 安装vim编辑器
大家可以去Ubuntu官网下载桌面系统:https://ubuntu.com/download/desktop,虽然最新版是19.04,但是建议大家下载稳定版18.04.安装过程非常简洁,我使用的是V ...
- Linux入门(11)——Ubuntu16.04安装texlive2016并配置texmaker和sublime text3
安装过程中需要调用 Perl 的模块 Digest::MD5 来检测 ISO 文件的完整性:升级过程中界面需要调用 Perl 的模块 Tk: sudo apt-get install libdiges ...
- Ubuntu16.04安装vim插件YouCompleteMe
原文 1 下载 git clone --recursive git://github.com/Valloric/YouCompleteMe 如果执行该命令没报错, 就ok了. 但是中途有可能会断掉, ...
- 【linux】ubuntu16.04安装vncserver实现远程访问图形界面
# 步骤 1 - 安装 X11VNC sudo apt install x11vnc -y # 步骤 2 - 配置访问密码 sudo x11vnc -storepasswd /etc/x11vnc. ...
- 1、Linux基础--相关软件安装与网络配置
1.虚拟机(VM安装) 2.网络配置 3.Linux操作系统安装 4.xshell安装
- linux子系统ubuntu16.04安装使用xrdp当远程桌面
参考文献:https://icytown.com/windows/windows-subsystem-for-linux-gui-xubuntu/ https://jingyan.baidu.com/ ...
随机推荐
- 34 文件地理数据库(GDB)变文件夹了怎么办
我们都知道文件地理数据库(GDB)是ArcGIS软件特有的格式,有其独特的设计之处,在文件资源管理器中显示为.gdb的文件夹,但是里面的文件却看不明白,而且将gdb文件夹在Windows资源管理器中直 ...
- Burp Suite Pro 教程
1.Burp Suite Pro2.0.11破解版-2018.11.06更新 说明基地址 来源:http://ximcx.cn/post-110.html 启动;如果是用的burp2.0,把下面的代码 ...
- Golang Go Go Go part3:数据类型及操作
五.Go 基本类型 1.基本类型种类 布尔值: bool 长度 1字节 取值范围 true, false注意事项:不可用数字代表 true 或 false 整型: int/uint 根据运行平台可能为 ...
- python制作词云
需要模块wordcloud,pip install wordcloud安装即可.代码: , #边距background_color='black',#指定背景颜色font_path='simhei.t ...
- [Swift]LeetCode174. 地下城游戏 | Dungeon Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. ...
- [Swift]LeetCode225. 用队列实现栈 | Implement Stack using Queues
Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. po ...
- [Swift]LeetCode443. 压缩字符串 | String Compression
Given an array of characters, compress it in-place. The length after compression must always be smal ...
- [Swift]LeetCode557. 反转字符串中的单词 III | Reverse Words in a String III
Given a string, you need to reverse the order of characters in each word within a sentence while sti ...
- [Swift]LeetCode581. 最短无序连续子数组 | Shortest Unsorted Continuous Subarray
Given an integer array, you need to find one continuous subarray that if you only sort this subarray ...
- Docker 搭建pxc集群 + haproxy + keepalived 高可用(二)
上一节我们有了两个分片的pxc集群,这一节我们接着安装haproxy和keepalived的实现集群的高可用 一.先下载haproxy的镜像 [root@localhost ~]# docker pu ...