Home  >  Article  >  Operation and Maintenance  >  Which file is linux's vimrc in?

Which file is linux's vimrc in?

藏色散人
藏色散人Original
2023-03-10 09:15:022445browse

Linux's vimrc is in the "/etc/vim" file, and the configuration file is named vimrc. In Fedora, the vim configuration file is stored in the "/etc" directory, and the configuration file name is also vimrc; in Enter the "sudo vim /etc/vim/vimrc" command in the terminal to edit the vimrc configuration file.

Which file is linux's vimrc in?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Which file is the vimrc of linux in?

Ubuntu vimrc configuration file storage location

How to set VI for Ubuntu The following settings for Ubuntu vimrc are applicable to Ubuntu and Fedora systems, and have not been verified for other systems. In Ubuntu, the vim configuration file is stored in the /etc/vim directory. The configuration file is named Ubuntu vimrc

Ubuntu vimrc has been widely used but is constantly being updated. Here is an introduction to Ubuntu vimrc installation, settings, and help. Everyone install and update the Ubuntu vimrc system. How to set VI in Ubuntu The following settings of Ubuntu vimrc are applicable to Ubuntu and Fedora systems, and have not been verified for other systems.

The vim configuration file in Ubuntu is stored in the /etc/vim directory, and the configuration file is named vimrc

The vim configuration file in Fedora is stored in ## In the #/etc directory, the configuration file is named vimrc

Enter the following command in the terminal to edit the Ubuntu vimrc configuration file:

sudo vim /etc/vim/vimrcOrsudo gedit /etc/vim/vimrc

Display line number

Add a new line at the end of the file and enter set nu

Syntax highlighting

Find the line "syntax on" in the file and remove the double quotes in front of it. The double quotes mean comments

syntax on

Auto indent

To add a line at the end of the file, enter set autoindent

To add a line, enter set cindent

Among them, autoindent is automatic indentation; cindent is automatic indentation especially for C language syntax

Note: If Ubuntu vimrc does not take corresponding actions after setting the above settings, please upgrade your Ubuntu vimrc to For the latest version, generally just enter the following command in the terminal:

sudo apt-get install vim

Related recommendations: "

Linux Video Tutorial"

The above is the detailed content of Which file is linux's vimrc in?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn