vim-sandwich icon indicating copy to clipboard operation
vim-sandwich copied to clipboard

Does not detect Tex textobjects m(, m[, etc.

Open albertfgu opened this issue 7 years ago • 4 comments

In a basic tex file with the lines

m
\left( \right)
m

Putting the cursor on the space and running sdm( does not delete the parentheses pair as desired. It will delete the two m's instead.

The same problem occurs with all the other m recipes (m(, m[, m{, m|, m<) and I also tested with M( with the same problem, so it probably happens with all the M's as well. It does not happen with a few other things I tested including l" and \[.

Also, the issue does not occur with sa. (A basic way to reproduce this is to do sam( and then sdm(, which fails.) So it seems that the m( recipe exists but there is a bug with detecting the textobject.

albertfgu avatar Jan 16 '18 21:01 albertfgu

It seems I disable them only in deleting actions intentionally, but I cannot remember why...

machakann avatar Jan 17 '18 13:01 machakann

ok, I will activate them, but I may revert if any problem were found.

machakann avatar Jan 17 '18 13:01 machakann

Hi, I started using sandwich again and noticed that I still have this problem even after updating the plugin and making a minimal vimrc (actually, I use Neovim). The same issue occurs for m( in any operator pending mode (including sr, sd). It also does not work in query mode: I believe vism( should select inside the nearest pair of \left( \right) braces (is this correct?), but instead selects between the nearest m characters.

albertfgu avatar Nov 02 '19 23:11 albertfgu

The latex surrounds still dont work for me in neovim btw

IndianBoy42 avatar Jul 02 '21 19:07 IndianBoy42