Code folding of vim_PHP tutorial
Vim also has a code folding function, which I have known before, but after all, it is not used much, so this function is basically rarely used. With my recent close contact with gvim, I have gradually become familiar with the code folding function. Once I opened a piece of php(as the current mainstream development language) code - such as PEAR.php(as the current mainstream development language), and found that the code inside was automatically folded After expanding the code, you can see that as long as there are /*{{{*/ and /*}}}*/ on both sides of the code, it will be automatically collapsed. Search the configuration carefully, one sentence is the key point:
foldmethod=marker
In this way, vim will automatically search the code and fold the content between {{{ and }}}, and the code There is a small comment at the end that is not useless:
/*
* Local Variables:
* mode: php(as the current mainstream development language)
* tab-width: 4
* c-basic-offset: 4
* End:
*/
This comment will be read by vim and automatically set to the environment variable in.
Regarding the usage of code folding, just type in vim:
:help zo
and you will see a lot of related shortcut keys. It takes some practice to get comfortable :)
My gvim configuration content has been added:
colo zellner
set guifont=Courier_New:h11:cANSI nobackup tabstop=4 shiftwidth=4 foldmethod=marker
au BufRead * simalt ~x
Some vim-related discoveries:
The shortcut keys for the previous article and the next article on Google Reader are j and k respectively, which are consistent with the cursor movement keys of vim. I don’t know if it is a coincidence or intentional. Therefore, if it is the latter, then the developers of Google Reader must also be fans of vim:)
When using firefox to view the source code of the web page, click "/" and a search box will be displayed, which is consistent with vim's search. I guess The developer of firefox is also a vim enthusiast:p

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Both vivox100s and x100 mobile phones are representative models in vivo's mobile phone product line. They respectively represent vivo's high-end technology level in different time periods. Therefore, the two mobile phones have certain differences in design, performance and functions. This article will conduct a detailed comparison between these two mobile phones in terms of performance comparison and function analysis to help consumers better choose the mobile phone that suits them. First, let’s look at the performance comparison between vivox100s and x100. vivox100s is equipped with the latest

With the rapid development of the Internet, the concept of self-media has become deeply rooted in people's hearts. So, what exactly is self-media? What are its main features and functions? Next, we will explore these issues one by one. 1. What exactly is self-media? We-media, as the name suggests, means you are the media. It refers to an information carrier through which individuals or teams can independently create, edit, publish and disseminate content through the Internet platform. Different from traditional media, such as newspapers, television, radio, etc., self-media is more interactive and personalized, allowing everyone to become a producer and disseminator of information. 2. What are the main features and functions of self-media? 1. Low threshold: The rise of self-media has lowered the threshold for entering the media industry. Cumbersome equipment and professional teams are no longer needed.

According to news on June 25, the source ytechb published a blog post yesterday (June 24), sharing a rendering of the Google Pixel 9 Pro Fold mobile phone case, once again showing the design of the back of this folding screen. According to previous news, Google will release the Pixel 9 series of mobile phones in October this year. In addition to the three phones in the Pixel 9 series, Pixel Fold will also be included in the Pixel 9 series and will be officially named Pixel 9 Pro Fold. The phone case exposed this time comes from accessory manufacturer Torro. The company's UK and US online stores have listed the product phone case and disclosed the design and display size of the phone. The page shows a large number of Pixel 9 Pro Fold phone case renderings

According to news on August 23, Samsung is about to launch a new folding mobile phone W25, which is expected to be unveiled at the end of September. It will make corresponding improvements in the under-screen front camera and body thickness. According to reports, Samsung W25, codenamed Q6A, will be equipped with a 5-megapixel under-screen camera, which is an improvement over the 4-megapixel camera of the Galaxy Z Fold series. In addition, the W25’s external-screen front camera and ultra-wide-angle camera are expected to be 10 million and 12 million pixels respectively. In terms of design, the W25 is about 10 mm thick in the folded state, which is about 2 mm thinner than the standard Galaxy Z Fold 6. In terms of screen, the W25 has an external screen of 6.5 inches and an internal screen of 8 inches, while the Galaxy Z Fold6 has an external screen of 6.3 inches and an internal screen of 8 inches.

What we are discussing today is not what a certain product is like, but returning to the topic of "folding screen" itself and exploring the "rationality" of folding screen mobile phones. First, let’s take a look at the market performance of folding screen mobile phones. According to IDC’s latest data report, China’s folding screen mobile phone market will ship approximately 7.007 million units in 2023, a year-on-year increase of 114.5%. Among them, China's foldable screen mobile phone market shipped approximately 2.771 million units in the fourth quarter of 2023, a year-on-year increase of 149.6%. The data does look good, and the growth is also very strong. However, compared with the approximately 270 million smartphone shipments in the Chinese market in 2023, this data is really not enough. In general

As Xiaohongshu becomes popular among young people, more and more people are beginning to use this platform to share various aspects of their experiences and life insights. How to effectively manage multiple Xiaohongshu accounts has become a key issue. In this article, we will discuss some of the features of Xiaohongshu account management software and explore how to better manage your Xiaohongshu account. As social media grows, many people find themselves needing to manage multiple social accounts. This is also a challenge for Xiaohongshu users. Some Xiaohongshu account management software can help users manage multiple accounts more easily, including automatic content publishing, scheduled publishing, data analysis and other functions. Through these tools, users can manage their accounts more efficiently and increase their account exposure and attention. In addition, Xiaohongshu account management software has

After editing text content in Word, you need to view and check the edited content. If there is a lot of content, it is inconvenient to read it. How to solve this problem? In this case, the word folding method is needed. Let me share the method tutorial with you guys! First, open the Word document on your computer, enter the required content and select it, then click the "Start" option in the menu bar, and then select a style to apply to the text paragraph you just selected. You can refer to the part marked with a red circle in the picture below. 2. Then, the selected text paragraph will change its style and add a small arrow, as shown in the red circle in the picture below: 3. Click the small arrow to freely expand or collapse the previously selected text paragraph, or directly Right click, from

According to news on June 21, foreign media recently released model photos of Samsung Galaxy Z Flip 6 on the Internet. According to the picture, it can be understood that the borders of Samsung Galaxy Z Flip 6 will be further narrowed, which means that the width of the phone may be reduced in the folded state, and it will also provide a more comfortable grip and portability. Moreover, compared with the previous generation ZFlip5, the model of Galaxy ZFlip6 is more square and the camera module on the back is more prominent. It is expected to use a new camera sensor. However, from the front, the creases of the phone are still relatively obvious, but considering that the leaked model is a model phone, there may be some differences with the real phone, so it is for reference only. In terms of performance configuration, Galaxy
