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

Sublime-like tab rendering #1

Closed
wants to merge 2 commits into from
Closed

Sublime-like tab rendering #1

wants to merge 2 commits into from

Conversation

chmln
Copy link
Contributor

@chmln chmln commented Apr 23, 2017

I got inspired by microsoft/vscode#25021

Before:

After:
new

Especially helpful to check if indendation is consistent in css:
styl

The screenshots above use editor.tabSize:4, but the implementation is flexible for 2-wide and 8-wide tabs as well.

The estimated tab glyph width can sometimes be off by 1-2px depending on the font, but that can be improved in the future with some additional effort.

@chmln chmln closed this Apr 23, 2017
@chmln
Copy link
Contributor Author

chmln commented Apr 24, 2017

Hey @spywhere

Your package.json's license field is MIT https://github.com/spywhere/vscode-whiteviz/blob/master/package.json#L19

I was under the impression my PR wasn't going to be accepted so I worked on my own fork with an opinionated config.

If you're willing to merge the changes, I might abandon my extension altogether.

@spywhere
Copy link
Owner

spywhere commented Apr 24, 2017

First of all, thanks for your understanding and for the PR itself.

Would it be better if the user can choose whether they want to use full-width tab rendering or not? As user who didn't use Sublime Text before might get confused with default behavior of VSCode. We might, as well, add or specified about this feature on the README instead. That way Sublime Text's users would know that this extension also support full-width tab rendering.

PS. As my timezone is weekends (at the time you submitted this PR), I didn't check my GitHub so I didn't see that. Sorry on my side also.

@chmln
Copy link
Contributor Author

chmln commented Apr 24, 2017

@spywhere

First of all, thanks for your understanding and for the PR itself.

This was just a misunderstanding 👍
I've made a PR before any forking attempts which I hope is indicative of my initial motivation.

Anyways.

Would it be better if the user can choose whether they want to use full-width tab rendering or not? As user who didn't use Sublime Text before might get confused with default behavior of VSCode

Generally I'm all for user choice.
However, I find the default arrows inexpressive and unpleasant enough to override this behavior.

For reference:

And my implementation:

We might, as well, add or specified about this feature on the README instead. That way Sublime Text's users would know that this extension also support full-width tab rendering.

Surely.

@chmln
Copy link
Contributor Author

chmln commented Apr 24, 2017

@spywhere should I submit a new PR?

please take a look at https://github.com/chmln/betterWhiteSpace/blob/master/src/extension.ts
I've done somewhat heavy refactoring and the code has 15% less LOC than the original

@spywhere
Copy link
Owner

I think it'd be a good idea to let you submit a PR. And later on (if needed), I'll do some refactoring again. What do you think?

@chmln
Copy link
Contributor Author

chmln commented May 3, 2017

@spywhere sounds good. I'll submit a PR as soon as I have some time.

Meanwhile I've managed to fix the jumpy tab display and enforced consistency across different OS

@chmln chmln mentioned this pull request May 24, 2017
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

Successfully merging this pull request may close these issues.

2 participants