当前位置:网站首页>Simple vim configuration
Simple vim configuration
2022-08-01 01:19:00 【HUAWEI CLOUD】
do not exit vim manual man
How to view the manual without exiting vim?
In the bottom line mode: !man query content Press q to exit and return to vim
Example: !man fork
Simple vim configuration
Users will only affect their own (user) operations in the configuration file of vim
root has its own vim configuration file, which will only affect itself (root)
Summary: only affects myself
Location of configuration file:
- Under the directory /etc/, there is a file named vimrc, which is the public vim configuration file in the system and is valid for all users.
- In each user's home directory, they can create their own private configuration file named: ".vimrc"
- For example, in the /root directory, a .vimrc file usually already exists. If it does not exist, it will be created
- Switch the user to be yourself and execute
su, enter your own main working directory, and executecd ~ - Open the .vimrc file in your own directory and execute vim .vimrc

Note: To create a .vimrc file in your own working directory (~)
The most basic vim configuration is written in the .vimrc file. To configure vim, you only need to add content to the .vimrc file
Common configuration options
Just write the corresponding content in the .vimrc file:
Example:
- Set syntax highlighting: syntax on
- Display line number: set nu
- Set the number of indent spaces to 4: set shiftwidth=4
Auto configure vim:
Enter the following command directly
curl -sLf https://gitee.com/HGtz2222/VimForCpp/raw/master/install.sh -o ./install.sh&& bash ./install.sh
Then follow the prompts to enter the root password, then wait for the installation configuration, and finally manually execute source ~/.bashrc.After the configuration is complete, functions such as auto-completion, line number display, and auto-indentation are available
Add user to trusted list
- You need to operate under the root user first
- Modify the content of the file:
vim /etc/suduers - Scroll down to the specific location, in insert mode, add the user to the trust list according to the format

边栏推荐
- Daily practice of LeetCode - Circular linked list question (interview four consecutive questions)
- Compose principle - the view and the principle of two-way data binding
- MYSQL master-slave replication
- WAASAP WebClient UI页面标签的决定逻辑介绍
- OSD read SAP CRM One Order application log way of optimization
- Academicians of the two academies speak bluntly: Don't be superstitious about academicians
- WeChat applet page syntax
- What practical projects can machine learning beginners learn?
- How to get started with YOLO?How to implement your own training set?
- 设计消息队列存储消息数据的MySQL表格
猜你喜欢

How to get started with YOLO?How to implement your own training set?

MYSQL主从复制

Key Points Estimation and Point Instance

Basic implementation of vector

IDEA无法识别module(module右下角没有蓝色小方块)

设备树的树形结构到底是怎样体现的?

MYSQL Index Analysis

ROS2系列知识(4): 理解【服务】的概念

MYSQL-Batch insert data

Team of Professor Chen Jianyu of Tsinghua University | Contact Safety Reinforcement Learning Framework Based on Contact-rich Robot Operation
随机推荐
High dimensional Gaussian distribution basics
值传递还是引用传递(By Value or By Reference)
GDB source code analysis series of articles five: dynamic library delay breakpoint implementation mechanism
[Microservice] Distributed Transaction Solution - Seata
【历史上的今天】7 月 31 日:“缸中之脑”的提出者诞生;Wi-Fi 之父出生;USB 3.1 标准发布
Rasa 3.x Study Series - Rasa - Issues 4898 Study Notes
YOLO怎么入门?怎么实现自己的训练集?
软考高级系统架构设计师系列之:信息系统基础知识
MYSQL-批量插入数据
pycaret source code analysis: download dataset\Lib\site-packages\pycaret\datasets.py
Detailed explanation of TCP protocol
sqlserver无法远程连接
/usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2*解决办法
Rasa 3.x 学习系列- Rasa - Issues 4918 学习笔记
Nmap Operation Manual - Full Version
Cmake introductory study notes
Chinese version of Pylint inspection rules
Key Points Estimation and Point Instance
Item 36: Specify std::launch::async if asynchronicity is essential.
Rasa 3.x Study Series - Rasa - Issues 4918 Study Notes