microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.29k stars 1.17k forks source link

Paste function on exit function in class with indentation as exist #23923

Open ManPython opened 1 month ago

ManPython commented 1 month ago

Paste function on exit function in class with indentation as exist.. I'm referring this case reading quick GPT ctr+c/v to omit case to tabulate whole function if exit. It's better to back-tab if wrong that still tab forward. The option to turn off this feature can be ok if some problems.

karthiknadig commented 1 month ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

ManPython commented 1 month ago

Nothing to record here.. it's clear that GPT fixing funtions and printing proposal code without class indention for def then must tabulate pasted def function to be level forwarded as old --->def

class test:
    def test(self):
        pass

From gpt

def test(self):
    print("tabulated this def")

Soo.. when pasting on

class test:
    def test(self):
        print("tabulated this def")