clarify the meaning of highlight (#718)

* clarify the meaning of highlight

* delete duplicated text
This commit is contained in:
restlessronin 2024-01-06 01:55:48 +05:30 • committed by GitHub
parent 372f36f324
commit f0ed95d693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -32,7 +32,7 @@
### Answer coding questions
Highlight sections of code and ask Continue for another perspective
Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) sections of code and ask Continue for another perspective
- “what does this forRoot() static function do in nestjs?”
- “why is the first left join in this query necessary here?”
@ -40,7 +40,7 @@ Highlight sections of code and ask Continue for another perspective
### Edit in natural language
Highlight a section of code and instruct Continue to refactor it
Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) a section of code and instruct Continue to refactor it
- “/edit rewrite this to return a flattened list from a 3x3 matrix”
- “/edit refactor these into an angular flex layout on one line"

View file

@ -210,7 +210,7 @@ const EditSlashCommand: SlashCommand = {
);
if (!contextItemToEdit) {
yield "Highlight the code that you want to edit first";
yield "Highlight (select and press `cmd+shift+M` (MacOS) / `ctrl+shift+M` (Windows)) the code that you want to edit first";
return;
}

View file

@ -18,6 +18,8 @@ As you use Continue more, you will learn when to trust it. A great way to get st
If you are trying to use it for a new task and don’t have a sense of how much Continue can help you complete it, it can often be helpful to start like this:
'Highlight' refers to the act of selecting a text range in a file and pressing 'cmd+shift+M' (Macos) or 'ctrl+shift+M' (Windows) to include it in the Continue chat message.
1. Highlight the code section(s) that you don’t understand and type "tell me how this code works" in the input box
2. If the explanation seems reasonable, then, while still highlighting the code section(s), type "how would you change this code to [INSERT TASK]?"
3. If this explanation is also pretty good, then, while still highlighting the code section(s), type `/edit [INSERT TASK]`. If you like the suggested diff, use `cmd+shift+enter` to accept the changes.