In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preface
It is well known that by default, vim does not highlight the configuration file of nginx, so you need to turn on this function manually. So how to open it manually? Let's take a look at the detailed implementation.
Download nginx.vim
Here take the Linux system as an example, other systems are more or less the same.
Change to the syntax configuration directory of vim and download the nginx syntax file.
Note that the vim74 in the path needs to correspond to the vim version number installed on the machine.
Cd / usr/share/vim/vim74/syntax & & wget-O nginx.vim https://vim.sourceforge.io/scripts/download_script.php?src_id=19394
Configure filetype.vim
Edit the filetype.vim file to register the nginx syntax file
Vim/ usr/share/vim/vim74/filetype.vim
Add the following code to the file, where nginx_path needs to be replaced with the configuration file directory of nginx on the machine, such as / etc/nginx/*:
"nginxau BufNewFile,BufRead nginx_path setf nginx
Effect at a glance
Before configuration
After configuration
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.