I am using neovim.

When editing a .tex file I don't want to wrap the lines within certain environments like equation or align and some others.

    % very long line I don't want to wrap because \left( \frac{}{} \right) is very long and wrapping makes it harder to read
And I want these lines to be wrapped because its text with some possible
inline maths. I am ok with inline math being wrapped for example $ax^2+b
x+c=0$  doesn't bother me.

But I wan't rest of the documents to be wrapped as usual. Is there any way I can do this?

  • Except for writing your own format expression (see e.g. vimtex), I don't know any ways to do this. But, IMHO, it is very possible to write wrap long equations for readability. I actually think the opposite of you, that equations should be wrapped, but normal text should not be wrapped (i.e. one sentence or paragraph per line). – Karl Yngve Lervåg Apr 10 '18 at 6:43