Enhances Python pasting in Visual Studio Code with smart indentation, inspired by PyCharm's intelligent paste behavior.
- Smart Indentation: Automatically adjusts indentation when pasting Python code, preserving relative structure and aligning with the current cursor position.
- Seamless Integration: Overrides the default
Ctrl+V
(Windows/Linux) orCmd+V
(Mac) paste action in Python files, making it effortless to use. - Context-Aware: Works only in Python files, leaving other languages unaffected.
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X
orCmd+Shift+X
on Mac). - Search for
Python Paste Pro
. - Click Install.
Alternatively, download the .vsix
file from the Visual Studio Marketplace and install it manually via "Install from VSIX" in the Extensions view.
- Open a Python file (
.py
). - Copy any Python code to your clipboard.
- Press
Ctrl+V
(Windows/Linux) orCmd+V
(Mac) where you want to paste. - The code will be inserted with smart indentation based on your cursor's position.
No additional configuration is needed Python Paste Pro
works out of the box!
- Visual Studio Code version 1.97.0 or higher.
- Works with any Python file recognized by VSCode's language identifier (
python
).
- Complex nested code with inconsistent indentation might require manual adjustment after pasting.
- Report any bugs or suggestions on the GitHub Issues page.
Contributions are welcome! If you'd like to improve Python Paste Pro
:
- Fork the repository (replace with your repo URL).
- Create a feature branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m "Add some feature"
). - Push to the branch (
git push origin feature-name
). - Open a Pull Request.
This extension is licensed under the MIT License.