Full support for tabs as indents
huyz opened this issue · comments
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.
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).
Thanks for quickly looking into this!