Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple code snippets #318

Open
DRKolev-code opened this issue May 15, 2024 · 0 comments
Open

Multiple code snippets #318

DRKolev-code opened this issue May 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@DRKolev-code
Copy link

If we have a situation like this.


User ---

Can you give me python functin to sum two numbers. Also how to use it. Make it two different code blocks

Copilot ---

Sure, here is a Python function that sums two numbers:

def sum_two_numbers(a, b):
    return a + b

To use this function, you can call it with two numbers as arguments. Here is an example:

result = sum_two_numbers(3, 5)
print(result)  # Outputs: 8

Looking at diff gives us:

-/009   .config/
\ No newline at end of file
+result = sum_two_numbers(3, 5)
+print(result)  # Outputs: 8
\ No newline at end of file

It does not do a diff on the first part.

Could we have the yank, diff, accept actions allow something like:

1<leader>y to yank the first code snippet? Same architecture for diff and accept?

@deathbeam deathbeam added the enhancement New feature or request label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants