-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tabstospaces always set to true for no reason in .py files #2213
Comments
There is a built-in ftoptions plugin which overrides some options depending on the file type, e.g. forces tabstospaces=true for Python and tabstospaces=false for Go. The easiest option for you is just to disable this plugin:
|
Thanks for your answer that helps a lot. Is there a way to configure this plugin ? this could be interesting. But I can't understand why this plugin to this for python by default because it is well known that python need tabs. |
It's a very simple plugin with hardcoded option settings: https://github.com/zyedidia/micro/blob/master/runtime/plugins/ftoptions/ftoptions.lua It is compiled into micro, however you can override it without recompiling by copying the runtime/plugins/ftoptions directory from micro source to your ~/.config/micro/plug and modifying ftoptions.lua.
I'm not at all familiar with Python but a brief googling suggests that the recommended indent style for Python is 4 spaces. |
Indeed sorry I was confused. Actually it's heavily debated. This being said you gave me a good solution that allows me to continue using Micro, thanks for that ! Have a nice day |
Description of the problem or steps to reproduce
Don't really know for sure but it happens when I open .py files in micro and I execute the :
show tabstospaces
It returns true. Then I execute
set tabstospaces false
If I execute the show again this time it returns false. I execute a
retab
If I quit micro after saving, and open the same file again and execute the previous
show
it will returns true again.I even tried to fix the "tabstospaces" to false inside the file
~/.config/micro/settings.json
with this syntax :{ "*.py": { "tabstospaces": false } }
I was unable to find help sorry if I missed the solution somewhere.
Thanks for your help. Micro is amazing thanks for the great work too.
Specifications
Version: 2.0.10
Commit hash: b976385
Compiled on August 07, 2021
OS: MacOs 11.5.1
Terminal: zsh
The text was updated successfully, but these errors were encountered: