vim编辑器设置行号和使用鼠标

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

Vim(Vi IMproved)是一个高度可配置的文本编辑器,起源于 Unix 系统的 Vi 编辑器。它被设计为一个功能强大、高效的编辑器,尤其适合开发者和系统管理员使用。但是对于新手来说不太友好,需要我们配置一下,以方便我们进行查看代码和编辑操作。

一、设置步骤

1.打开/etc/vim/vimrc配置文件

在最后面添加如下两行即可。

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd		" Show (partial) command in status line.
"set showmatch		" Show matching brackets.
"set ignorecase		" Do case insensitive matching
"set smartcase		" Do smart case matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
"set hidden		" Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes)

" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
set nu 
set mouse=a 
#保存之后就可以很友好地使用了。

总结

本文介绍了如何进行自定义vim编辑器,以方便我们的开发流程。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值