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

Define tabulation width in term of spaces instead of pixels #3729

Closed
rlaverde opened this issue Nov 23, 2016 · 3 comments
Closed

Define tabulation width in term of spaces instead of pixels #3729

rlaverde opened this issue Nov 23, 2016 · 3 comments

Comments

@rlaverde
Copy link
Member

rlaverde commented Nov 23, 2016

In PR #3663 I assume that tabulation width will be always 4 spaces, and indentation could look wrong depending of tab_stop_width value, I think this could be improved defining it in spaces instead of pixels

I suggest:

  • change:
    /config/main.py
    'tab_stop_width': 40,
    to
    'tab_stop_width_spaces': 4,

  • use tab_stop_width_spaces in fix_indent calculations

  • and set tab stop using space width
    self.setTabStopWidth('tab_stop_width_spaces * self.editor.fontMetrics().width(' '))

@rlaverde rlaverde changed the title Define tabulation with in term of spaces instead of pixels Define tabulation in term of spaces instead of pixels Nov 23, 2016
@rlaverde rlaverde changed the title Define tabulation in term of spaces instead of pixels Define tabulation width in term of spaces instead of pixels Nov 23, 2016
@ccordoba12 ccordoba12 added this to the v3.1 milestone Nov 23, 2016
@ccordoba12
Copy link
Member

Please don't forget to reference the issues you open from your PRs :-)

@rlaverde
Copy link
Member Author

@ccordoba12 It's ok to do this change? any suggestions? I'll work on it

@ccordoba12
Copy link
Member

Yeah, please go for it! I haven't touched our support for tabs in a long time, so it'd be really nice to improve it (given that we already offer it :-)

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

No branches or pull requests

3 participants