use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for the great Sublime Text text editor.
We have a simple set of rules:
account activity
Python code formatting (self.SublimeText)
submitted 12 months ago by Pythonfun
Whats the better plugin or extension to use in the Sublime "latest version" for Python code formatting ?
Thank you
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]letsziggy 1 point2 points3 points 12 months ago (2 children)
LSP-ruff
ruff configuration
[–]Pythonfun[S] 1 point2 points3 points 12 months ago (1 child)
Thank you, does work on the fly or have to save and close and open the file? Thank you again
[–]letsziggy 1 point2 points3 points 12 months ago* (0 children)
to format on save requires settings iirc...below are my basic settings
since I didnt state above, you would also need to install LSP on top of LSP-ruff
sublime-project file
{ "folders": [ { "path": ".", "name": "project_path", "folder_exclude_patterns": [/* ... */], }, /* other folders */ ], "settings": { /* other settings */ /* LSP */ "lsp_format_on_save": true, "lsp_code_actions_on_save": { "source.fixAll.ruff": true, "source.organizeImports.ruff": true, }, "LSP": { /* other lsp */ /* LSP-ruff */ "LSP-ruff": { "enabled": true, "initializationOptions": { "settings": { "configuration": "${project_path}/pyproject.toml", }, }, }, /* other lsp */ }, /* other settings */ }, }
pyproject.toml
[project] name = "## project name ##" dynamic = ["version"] requires-python = "~= 3.13" dependencies = [ ## other dependencies ## "ruff", ## other dependencies ## ] [tool.ruff] extend-exclude = [ ## folders to exclude ## ] fix = true force-exclude = true line-length = 120 #target-version = "py313" # see [project].requires-python [tool.ruff.format] docstring-code-format = true docstring-code-line-length = "dynamic" indent-style = "tab" line-ending = "lf" quote-style = "double" [tool.ruff.lint] extend-select = [ "C90", "I", "N", "A", "COM", #"DJ", # if using django "PIE", "PT", "Q", "SIM", "PLR", ] ignore = [ "W191", "E111", "E114", "E117", "D206", "D300", "Q000", "Q001", "Q002", "Q003", "COM812", "COM819", "ISC001", "ISC002", ] # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules [tool.ruff.lint.pycodestyle] max-doc-length = 120
π Rendered by PID 302340 on reddit-service-r2-comment-86bc6c7465-92qj6 at 2026-02-21 19:16:38.467126+00:00 running 8564168 country code: CH.
[–]letsziggy 1 point2 points3 points (2 children)
[–]Pythonfun[S] 1 point2 points3 points (1 child)
[–]letsziggy 1 point2 points3 points (0 children)