Skip to content
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

tab in python #3883

Closed
notwidow opened this issue Sep 18, 2022 · 12 comments
Closed

tab in python #3883

notwidow opened this issue Sep 18, 2022 · 12 comments

Comments

@notwidow
Copy link

notwidow commented Sep 18, 2022

Hi, I have this issue in helix. When i define a function in python and press enter for the next line. then it does not indent ( add tab ) on the line.
pyso

Expected Behavior
when i define the funciton and press enter it should have added a tab by default.

Currernt Behavior
make a fucntion and press enter and it will take you to the begining of next line.

Steps to reproduce
create any python file
make a function and press enter

Edit
this does not work at all in python files, i did

for i in range(1,101):

and was then moved to begining of the next line.
do i need to configure it?

@archseer
Copy link
Member

Duplicate of #763

@archseer archseer marked this as a duplicate of #763 Sep 18, 2022
@archseer archseer closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2022
@notwidow
Copy link
Author

Duplicate of #763

tell me whether it will be fixed or not? i do programming in python all time and this is totally a mess. it is keeping me from fully convert to helix.

@archseer
Copy link
Member

Did you look at the issue that was linked? It has a PR attached. #3382

@notwidow
Copy link
Author

Did you look at the issue that was linked? It has a PR attached. #3382

i looked at it..but since i tried helix months ago and this issue i faced at that time also. so even after months it exists....

@archseer
Copy link
Member

The fix was recently created (1 month ago) and will eventually be merged. Feel free to contribute and/or test the fix and get it merged sooner.

@notwidow
Copy link
Author

The fix was recently created (1 month ago) and will eventually be merged. Feel free to contribute and/or test the fix and get it merged sooner.

okay and i noticed that tab inserts 2 spaces... how to change it to 4?

@archseer
Copy link
Member

@notwidow
Copy link
Author

It should insert 4 for python code: https://github.com/helix-editor/helix/blob/master/languages.toml#L449-L450

yes but im asking for others... javascript and other langs

@notwidow
Copy link
Author

It should insert 4 for python code: https://github.com/helix-editor/helix/blob/master/languages.toml#L449-L450

it inserts 2 spaces in js

@notwidow
Copy link
Author

It should insert 4 for python code: https://github.com/helix-editor/helix/blob/master/languages.toml#L449-L450

there should be an option for tab-width .... some like it 2 some 4 some 3 and some 5

@Ordoviz
Copy link
Contributor

Ordoviz commented Sep 18, 2022

Add this to your ~/.config/helix/languages.toml:

[[language]]
name = "javascript"
indent = { tab-width = 4, unit = "    " }

@notwidow
Copy link
Author

Add this to your ~/.config/helix/languages.toml:

[[language]]
name = "javascript"
indent = { tab-width = 4, unit = "    " }

i know that but i meant a global one that sets for all. anyway thank you..
that way i will have to write it for every language..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants