Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
ale
Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
Have you tried black? I use it to format files I am working on. The main idea is to not have multiple styles but just one.
Vim is incapable of detecting indent rules on its own but there are a couple of plugins like vim-sleuth for that.
Ale can format files on save once you specify a linter: lint and fix all files automatically by executing vim on them.
Or simply fix the python files by executing a fixer upon them, no need to even use Vim. I use yapf
Related posts
- nbdev formating and linting
- I wrote a script to periodically change my Desktop background to live satellite images!
- Formatting Code with Black
- Python Code Quality - Improve the quality of your Python code with linters, code formatters, and security vulnerability scanners
- Code Quality Tools in Python