Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PyNewlineNew to Visual Studio Code? Get it now.
PyNewline

PyNewline

Bartol Hrg

|
122 installs
| (0) | Free
patch for pylance to not remove indentation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

README

Extension for inserting newlines in python.

I have specific coding style for python:
I use tabs, semicolons, and pass to close scope.
So example program would be:

class A:
	def f():
		if (False
			or a
			or b
		): doSomething();
	pass
pass

But Pylance can't handle that:
When entering a newline, it randomly erases indentation.

Usage

Just install it.
It will create keybinding for enter when in Python file
(i.e. with condition editorTextFocus && !editorReadonly && editorLangId == 'python')

Source

my:

  • GitHub https://github.com/BartolHrg/vscode-PyNewline
  • Visual Studio Marketplace https://marketplace.visualstudio.com/items?itemName=BartolHrg.pynewline
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft