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

How to use nginx.vim tools to highlight syntax and format configuration nginx.conf files

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "how to use the nginx.vim tool for syntax highlighting and formatting the configuration nginx.conf file", 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 use the nginx.vim tool for syntax highlighting and formatting the configuration nginx.conf file" it!

I use tengine, and the installation directory is / usr/local/tengine.

1. Download nginx.vim

two。 Upload nginx.vim to ~ / .vim / syntax/, and add the following to the file ~ / .vim / filetype.vim:

Au bufread,bufnewfile / etc/nginx/*,/usr/local/nginx/conf/* if & ft = =''| setfiletype nginx | endif

(flexible configuration according to nginx installation directory)

If there are no directories and files to create a new one, mine is as follows:

Au bufread,bufnewfile / etc/nginx/*,/usr/local/nginx/conf/,/usr/local/tengine/conf/* if & ft = =''| setfiletype nginx | endif

3. Then open the nginx.conf, sure enough, there is a color, hehe.

At first, it was like this:

Now it goes like this:

Thank you for your reading, the above is the "how to use the nginx.vim tool for syntax highlighting and formatting the configuration nginx.conf file" of the content, after the study of this article, I believe you on how to use the nginx.vim tool for syntax highlighting and formatting the configuration nginx.conf file has a deeper understanding of this problem, the specific use of the situation also needs to be verified in practice. 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.

Share To

Internet Technology

Wechat

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

12
Report