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

Full support for tabs as indents #20

Open
huyz opened this issue Nov 12, 2022 · 2 comments
Open

Full support for tabs as indents #20

huyz opened this issue Nov 12, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@huyz
Copy link

huyz commented Nov 12, 2022

On a line indented by tabs (I tried size 2 and 4), if I don't select a word and I merely put the cursor on a word, the word searched is wrong and there's no match.

@Noorts Noorts self-assigned this Nov 12, 2022
@Noorts Noorts added the bug Something isn't working label Nov 12, 2022
@Noorts
Copy link
Owner

Noorts commented Nov 12, 2022

Hey @huyz, thanks for reporting the issue!

I looked into the issue and just created a quick fix. This fix adds limited support for tab indents to the plugin. It requires the "Use tab character" option in the "Tabs and Indents" menu to be ticked and requires all tabs in the file to adhere to the "Tab size" set in the same menu. You can open this menu by clicking on the "4 spaces" or "Tab" in the bottom right toolbar of the IDE and clicking "Configure Indents for Java".

Thus, if one is working in a file that uses tabs whilst the IDE is configured for this properly, then with the fix it should now behave as expected. Toggling int in the example below should work.

<tab_equal_to_tab_size>int count = 0;

The fix is limited in the sense in that it doesn't support arbitrarily sized tabs across the file yet. This is a more complicated issue to solve due to JetBrains' Caret and Document API. I'll see about providing support for arbitrarily sized tabs somewhere in the future.

Thus, the example below will not yet work.

<tab_size_2><tab_size_4>int count = 0;

The fix (v1.2.10) is available here as a release and will be available on the marketplace and in your IDE once JetBrains approves the update (usually two business days).

@Noorts Noorts changed the title Doesn't handle tab indents Full support for tabs as indents Nov 12, 2022
@Noorts Noorts moved this to Backlog in @Noorts' Toggler Nov 12, 2022
@huyz
Copy link
Author

huyz commented Nov 13, 2022

Thanks for quickly looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants