Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of highlighting NGINX configuration File by VIM

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the "VIM highlight NGINX configuration file method" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "VIM highlight NGINX configuration file method" article can help you solve the problem.

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

This is the end of the introduction on "the method of VIM highlighting NGINX configuration file". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report