UNITADE.md icon indicating copy to clipboard operation
UNITADE.md copied to clipboard

[FEATURE]: "indent visual width" setting for use with .txt files

Open jterrain opened this issue 6 months ago • 2 comments

What the essence of your feature request

Windows Notepad utilizes an 8-space tab indent, while Obsidian+UNITADE default to 4 spaces. Thus, any Notepad-authored .txt file utilizing tab indentation for columns, etc. will likely appear have lots of misaligned content when viewed in Obsidian+UNITADE. (Conversely, Obsidian-authored files will look misaligned in Notepad.)

Native Obsidian offers this setting in Options > Editor: Indent visual width (number of spaces a tab character will render as)

...however, it doesn't get applied to .txt files via UNITADE. Could UNITADE offer a similar setting that would work with .txt files?

Code of conduct

  • [x] I agree to follow this project's code of conduct

Issue policy

  • [x] I agree to follow this project's issue policy

jterrain avatar May 08 '26 09:05 jterrain

@Falcion thank you for opening the feature request. And thank you for all the wonderful support along the way - it means a lot!

Needing to make some long-term decisions on workflow for files that will sometimes be edited in Notepad. If this functionality (adjustable indent visual width) isn't planned for a long time in UNITADE, will need to use a non-Obsidian solution. It would be much better if this worked because UNITADE is an excellent solution otherwise; any possibility this may get worked out soon?

jterrain avatar Oct 16 '26 15:10 jterrain

Hello yet again, there are two ways to implement such feature: just add "direct" option in settings for this field in which you could edit indent visual width, as mentioned in #176, this feature is defined in this codeblock: https://github.com/Falcion/UNITADE.md/blob/823982bba8448d52dc9725d176df3d53f70d12e8/source/utils/utils.ts#L487

And many other parameters (consider this code as "themes").

Or there is some very far-far in future feature which I wanted to implement while globally refactoring plugin in branch https://github.com/Falcion/UNITADE.md/tree/settings-rework-preview

I was planning to create some "massive" text field which would read pseudo-CSS for the code editor and parse values in code editor generator: but just like as settings refactoring stalled and was partially forgotten (I have dreams about this refactoring, but don't have REQUIRED time for such global update).

Currently plugin is under maintanence and in HIGHEST priority requires to be updated accordingly to last guidelines of code, see #178 - plugin has some problems which require immediate fixing.

So, in short terms, plugin has some ideas and even prepared architecture, but I can't, in current timeline, solo develop fully designed option to edit indent visual width, only add option like font size.

Falcion avatar Oct 16 '26 16:10 Falcion