Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
GoogTech
Linux-Ubuntu
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
Linux-Ubuntu
/
vimrc.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
48 lines (45 loc) · 1.31 KB
master
Breadcrumbs
Linux-Ubuntu
/
vimrc.txt
Copy path
Top
File metadata and controls
Code
Blame
48 lines (45 loc) · 1.31 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
vim会将我们以前的行为都记录在'viminfo'中,查看: '~/.viminfo'
其实无需修改:'/etc/vimrc'中的vim配置参数,可以通过修改'~/.vimrc'这个文件来设置vim的环境参数(注意:如果这个文件不存在可以手动创建)
示例:
vim ~/.vimrc
set xxx
set xxx
...
创建并保存这个文件后,下次启动vim时就会按照这个文件中的参数进行环境配置.
vim常用的环境参数如下所示:(注意:'set'前的':'可以省略)
#设置行号
:set nu
#取消行号
:set nonu
#设置高亮查找
:set hlsearch
#取消高亮查找
:set nohlsearch
#自动备份文件
:set backup
#开启右下角状态说明
:set ruler
#显示左下角如:INSERT之类的状态栏
:set showmode
#设置退格键功能(为2时可以删除任意字符,为0/1时可以删除刚输入的字符)
:set backspace{0,1,2}
#显示目前所有的环境参数值
:set all
#显示与系统默认值不同的参数值
:set
#设置是否开启显示相关程序语法高亮功能
:syntax on/off
#设置背景为夜间模式
colorscheme evening
#以C/C++的模式缩进
:set cindent
#设置tab长度为4
:set tabstop=4
#自动对齐
:set autoindent
#括号匹配
:set showmatch
#智能对齐
:set smartindent
#..End
#If you want to konw about vim deeply,please refer to : http://blog.csdn.net/xiajun07061225/article/details/7039413
You can’t perform that action at this time.