How to Use Quick Commands from the Editor
Learn how to use quick commands in the editor to streamline tasks like explaining files, finding bugs, and generating tests or documentation, all without needing to write prompts. Ideal for beginners looking to enhance productivity.
Estimated time: 3 minutes
Difficulty: Beginner
Why you'd use this
Some requests come up so often that they are one click away: explain the file you are looking at, find a bug in it, refactor it, generate tests for it, or document it. These quick commands are on the editor's right-click menu and in the chat's command menu, and each one sends a well-formed request with the current file attached, so you get a consistent result without writing a prompt.
Before you start
Permissions required:
- None.
You'll need:
- A source file open in the editor.
Steps
- Open a source file and right-click anywhere in the editor.
- Choose one of the eLLM entries: Explain Current File, Find Bug, Refactor, Generate Tests or Generate Documentation.
- The chat panel opens with the request already sent. Read the streamed reply; for Refactor, Generate Tests and Generate Documentation, review the proposed file cards and click Apply on the ones you want.
- For a project-wide overview, run eLLM: Explain Project from the Command Palette or the / menu. The assistant reads the project map and key files and describes the structure.
- To repeat a quick command from the keyboard, press / in the composer and pick it from the Understand or Generate group.
What you should see
Explain and Find Bug produce an answer with file and line references. Generate Tests proposes a new test file placed where the project's other tests live. Generate Documentation proposes doc-comments and README changes as diff cards.
Troubleshooting
- "Open a file to explain" message: the command needs an active text editor. Click into a file first.
- Find Bug reports nothing: describe the symptom in the chat instead, for example "The total is wrong when the cart is empty", so the search is targeted.
Related guides
- How to Review Changes and Run a Security Review
- How to Ask Questions About Your Codebase
person people found this useful.