In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "how to achieve linux Vi editor code highlighting settings and permanent display line number", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "how to achieve linux Vi editor code highlighting settings and permanent display line number" bar!
Vi Editor Code highlight Settings
1. Check whether highlighting is turned on. Generally speaking, it is on by default.
2. Modify # vi / etc/bashrc and add it at the end.
Alias vi=vim
Then wq saves and exits.
This opens vim automatically when you type vi in shell (vim is short for vi improve).
3. Modify # vi / etc/vimrc by adding "syntax on" in the following sentence, and then restart vi or restart the computer to turn on the highlight.
Bash/shell Code copies content to the clipboard
If & t_Co > 2 | | has ("gui_running")
Syntax on
Set hlsearch
Endif
Note: if you have one, you don't have to add it.
In the Linux system, we often use vi or vim commands to manipulate the text, sometimes, our script file has an error, will throw a line number exception, and then we according to the prompt, re-open, our source code to view, and at this time, if your vim is not set to display line number function, we find the problem of a line of code, it is very inconvenient.
Set the Vim editor to permanently display line numbers
Modify the / etc/vimrc file and add the following two lines of setup commands at the end of the file:
The code is as follows:
Set nu
Set tabstop=4
Note: set nu # shows line number set tabstop=4 # sets indentation
Thank you for your reading, the above is the "how to achieve linux Vi editor code highlighting settings and permanent display line number" of the content, after the study of this article, I believe you on how to achieve linux Vi editor code highlighting settings and permanent display line number of this problem has a more profound experience, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.