Instructions: Create new document Open existing document Save document Edit text Undo and redo Advanced features: Syntax highlighting Autocomplete Package selection Multi-cursor editing Command panel Customization: Edit preference file (.sublime- preferences)Edit the key binding file (.sublime-keymap)
How to use the Sublime text editor
Sublime is a popular text editor popular with developers and writers for its power, flexibility, and customizability. Here's how to use Sublime:
Interface
- After opening Sublime, you will see an interface with a menu bar, editing area, and status bar.
- The menu bar contains options for all editor functions.
- The editing area is used to write and edit text.
- The status bar displays information about the current document and editor settings.
Basic Usage
-
Create a new document: Click "File" > "New" on the menu bar , or use the shortcut "Ctrl" "N" (Windows) or "Cmd" "N" (macOS).
-
Open an existing document: Click "File" > "Open" on the menu bar, or use the shortcut key "Ctrl" "O" (Windows) or "Cmd" O" (macOS).
-
Save the document: Click "File" > "Save" on the menu bar, or use the shortcut key "Ctrl" "S" (Windows) or "Cmd" "S" (macOS).
-
Edit text: Use the keyboard or mouse to enter and edit text in the editing area.
-
Undo and Redo:Use "Edit" > "Undo" or "Edit" > "Redo" on the menu bar, or use the shortcut key "Ctrl" "Z ” (Undo) and “Ctrl” “Y” (Redo) (Windows) or “Cmd” “Z” (Undo) and “Cmd” “Y” (Redo) (macOS).
Advanced features
-
Syntax highlighting: Sublime will automatically recognize syntax based on file extension or content and use Highlight colors highlight code elements.
-
Autocomplete: Sublime offers an autocomplete feature that suggests code snippets and words based on what you type.
-
Wrap Selection: You can select wrapped around a block of code or word by clicking and dragging with the
Ctrl
or Cmd
key text.
-
Multi-cursor editing: You can hold down the
Ctrl
or Cmd
key and click the mouse to create multiple cursors at different locations and edit them simultaneously text.
-
Command Panel: Use
Ctrl
Shift
P
(Windows) or Cmd
Shift
P
(macOS) Opens the Command Panel for quick access to editor commands and features.
Customization
Sublime is highly customizable. You can change its appearance, keybindings, and functionality by editing the following file:
-
Preferences file (.sublime-preferences): located at
Preferences
folder for managing editor settings.
-
Key binding file (.sublime-keymap): Located in the
Keymaps
folder, used to define and modify keyboard shortcuts.
Sublime’s official website and community offer a wealth of resources and tutorials to help you learn more about the editor and get the most out of its features.
The above is the detailed content of How to use sublime. For more information, please follow other related articles on the PHP Chinese website!