Home > Development Tools > sublime > body text

How to set up auto-completion in sublime

下次还敢
Release: 2024-04-03 10:42:17
Original
591 people have browsed it

Sublime Text can set up auto-completion by following these steps: Install the code completion plug-in. Enable auto-completion and check the box. Customize completion triggers (default triggers are ., (, ", '). Specify the completion source (e.g. "source.python"). Take advantage of advanced options (e.g. snippets, syntax checking, delay).

"How

Set auto-completion in Sublime

Sublime Text is a popular text editor that provides a wealth of features to assist with coding, including auto-completion.

Setup steps:

  1. Install code completion plug-ins: Such as AutoComplete, AutoFileName or Emmet.
  2. Enable auto-complete:Select "Tools" > "Settings" in the menu bar, then enter "auto_complete" in the "Search Settings" box. Check "Automatic Completion" checkbox.
  3. Custom completion triggers: Find the "auto_complete_triggers" setting and modify it as needed. By default, it is set to ., (, ", and '. You can add or remove triggers to customize the behavior of completion.
  4. Specify completion source: You can also specify the source to be used for completion. In the "auto_complete_selector" settings field, enter the file type or range for which you want autocompletion to apply. For example, you can set it to "source.python" to enable autocompletion in Python files.

Advanced options:

  • Using Snippet: You can extend autocompletion using code snippets. In the "auto_complete_snippets" setting field, enter the code snippets you wish to use.
  • Enable syntax checking: In the "auto_complete_use_syntax_check" setting, Enable syntax checking to only suggest completions that comply with the file's syntax rules.
  • Set Delay: Use the "auto_complete_delay" setting to fine-tune the delay of the autocompletion trigger.

By following these steps, you can easily set up autocompletion in Sublime Text and customize it to your needs. It will greatly simplify your coding workflow and increase your efficiency.

The above is the detailed content of How to set up auto-completion in sublime. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!