Skip to content

Improve ts$ when changing to display math #2321

@ji-cerny

Description

@ji-cerny

To start, I really like the new "ts$" feature, thanks for it!

I believe that it could be improved slightly: I never use $$, \[ and \] for displayed mathematics. So I put

let g:vimtex_env_toggle_math_map = {
          \ '$': 'equation',
          \ '\[': 'equation',
          \ '$$': 'equation',
          \ '\(': '$',
          \}

into my .vimrc file. This does not work as expected (at least for me) since it does not put \begin{equation} and \end{equation} on new lines (as it does with \[, \] when g:vimtex_env_toggle_math_map contains '$': '\['). A workaround is to keep '$': '\[' there and to do ts$ twice, but it would be nicer not to have to.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions