PilgrimLyieu
PilgrimLyieu
In my view, we can use `vimtex#delim#get_surrounding` command to get the position of the matching bracket. ``` \frac{...}{...} --> \frac{...}{...} --> \frac{...}{...} --> \frac{...}{...} --> \frac{...}{...} --> \dfrac{...}{...} ``` for...
> You want something like this: > > ```viml > let g:vimtex_toggle_fractions = [ 'INLINE', 'frac', 'dfrac', 'cfrac' ] > ``` > > where `g:vimtex_toggle_fractions` specify the various fraction commands...
> but I'll look into it when I get the time :) Thanks!
试了一下,确实如此,那为什么不先移到右侧再预览呢?
Great! Appreciating your excellent works!
I have same issue sometimes. Does it happen to you every time? If not, I think it is not problem of UltiSnips.
You should check the document for further information. This feature is not supported. Instead, you could use `post_jump`, `post_expand` or `pre_expand`. `snip.expand_anon` is supported in these cases.
Here's an [example](https://github.com/pilgrimlyieu/Snippets/blob/master/markdown/math_environments.snippets). ```snippets global !p def display_environment(snip, env = '', option = ''): before_text = snip.buffer[snip.line][:snip.snippet_start[1]] after_text = snip.buffer[snip.line][snip.snippet_end[1]:] snip.buffer[snip.line] = '' anon_snippet = before_text ...
Maybe you mean `priority`? You can use `priority` syntax for snippets set followed. ```snippets priority 100 snippet a aaa endsnippet snippet b bbb endsnippet priority -100 snippet c ccc endsnippet...
But I'm confused that why both snippets are triggered. Actually, it should trigger the corresponding language or `all` snippets.