Home > Backend Development > PHP Tutorial > Teach you step by step how to customize EditPlus' PHP auto-complete function

Teach you step by step how to customize EditPlus' PHP auto-complete function

WBOY
Release: 2016-08-08 09:18:55
Original
1733 people have browsed it

Written before

When writing PHP, I usually use lightweight editors such as EditPlus instead of IDEs. EditPlus has a PHP auto-completion function, but how can the auto-completion be controlled by others? Obviously you have to do whatever you want. Now, let us DIY together to create your own EditPlus.

Get to know php.stx and php.acp

  1. First of all, you need to know two files: php.stx and php.acp. Among them, php.stx is related to the syntax of PHP. You can download the corresponding php.stx from the Internet according to your PHP version.
  2. Then, php.acp is the file that configures automatic completion, which is the core of our operation.

Open the php.acp file

In your EditPlus installation directory, there will be a php.acp file, which stores the relevant configuration information for automatic completion. Let’s open it:
Teach you step by step how to customize EditPlus PHP auto-complete function. You can open it directly in Notepad in the file directory, or you can open it in EditPlus. I chose the latter;
Teach you step by step how to customize EditPlus PHP auto-complete function. Click: Document in the toolbar and select the last item in the drop-down menu: Permanent Settings (settings, long-term effective):
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Then, open Preferences and click: File->Settings&syntax. Select PHP in File types.
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Then in the Settings and syntax column below, click the three-dot button in front of Open in the Syntax file column:
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Select php.stx and click "Open":
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Check Auto Completion in the next column, and then click "Open" next:
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Click "OK". You will find that the php.acp file has been opened:
Teach you step by step how to customize EditPlus PHP auto-complete function

Modify the php.acp file

Let's get familiar with some of the syntax in the php.acp file so that we can easily modify the file. Purpose of personalization:
Teach you step by step how to customize EditPlus PHP auto-complete function. The first thing we see is: #TITLE=PHP/PHPDoc, which means that the file belongs to the PHP configuration file, and the following lines starting with; are comments
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Then: #CASE=y, which means that the subsequent configuration is case-sensitive! ! !
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Finally, the main dish is here. Now it is a group of configurations. Take the following picture as an example. In the picture, #T means keyword, and #T=if, which means the keyword of this configuration is if. , when you enter if in the text and press Enter, if will be replaced and the following characters will be displayed:
if ()
{

}
Teach you step by step how to customize EditPlus PHP auto-complete function
Teach you step by step how to customize EditPlus PHP auto-complete function. Careful students may find that a blue "^!" is missing, which indicates the position of the mouse. That is to say, when you enter if in the text and press Enter, it will be replaced with:
if( )
{

}
At the same time, the mouse will be at the location of "^!". In this case, it is waiting for you to enter the condition
Teach you step by step how to customize EditPlus PHP auto-complete function. According to this syntax, you can have tons of personalized configurations of your own!
Teach you step by step how to customize EditPlus PHP auto-complete function. The above syntax is not only applicable to PHP, but also to the automatic completion configuration of other languages. Now, start your DIY journey!

Note: If you like the color scheme of my EditPlus in this article, you can go here:
http://blog.csdn.net/yongfTeach you step by step how to customize EditPlus PHP auto-complete function0Teach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete function/article/details/Teach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete function0Teach you step by step how to customize EditPlus PHP auto-complete functionTeach you step by step how to customize EditPlus PHP auto-complete function

Copyright Statement: Welcome to reprint and spread, but please contact me before reprinting, thank you for your cooperation

The above has introduced a step-by-step guide to personalizing the PHP auto-completion function of EditPlus, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template