lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.56k stars 391 forks source link

Syntax concealing option to maintain spacing #3015

Closed Felipe-9 closed 1 month ago

Felipe-9 commented 1 month ago

After using syntax concealing i noticed a little problem when constantly editing math equations and solutions, that is i often find myself coming back to edit a line and when the cursor steps on the line, everything is in a new position.

it would be nice for when syntax concealing the characters that are unaffected would stay on their place/column and the affected ones would be preceded by spaces equivalent to the original string replaced, that is

% strings like this
= n\,C_v\,\adif{T}\big\rvert_{T_1}^{T_2}
% becomes like this
= n  C ᵥ      Δ{T}         |_{T ₁}^{T ₂}
% instead of
= nCᵥΔ{T}|_{T₁}^{T₂}

at a glance squishing everything together might be more readable, but its less editable when we have dozen of lines being edited.

lervag commented 1 month ago

it would be nice for when syntax concealing the characters that are unaffected would stay on their place/column and the affected ones would be preceded by spaces equivalent to the original string replaced, …

I don't think there is any options or features that allow for this behaviour. And I don't see any easy way to implement it. Sorry!