Open fecet opened 3 years ago
I have the same problem, do you have coc.nvim? I have that plugin and when i disable it, everything works normally. Hopefully there is some kind of fix
I have the same problem, do you have coc.nvim? I have that plugin and when i disable it, everything works normally. Hopefully there is some kind of fix
Many thanks for your continued attention to this issue, now I have a workaround at least.
Issue occurs without coc.vim
. One can reproduce the error without any other plugins loaded.
Steps:
text.snippets
:
snippet pair "Ordered pair"
($1, $2)
endsnippet
.vimrc
, perhaps using the let
keyword if you don't use vim9script:
g:UltiSnipsExpandTrigger = "<Tab>"
g:UltiSnipsJumpForwardTrigger = "<Tab>"
g:UltiSnipsJumpBackwardTrigger = "<S-Tab>"
vim --noplugin tmp.txt
, or with whatever file you wish to edit:source /usr/share/vim/vimfiles/plugin/UltiSnips.vim<Enter>:source /usr/share/vim/vimfiles/autoload/UltiSnips.vim
, changing the directories depending on where your UltiSnips install is located.pair<Tab>1<Esc>o<Tab>
Explanation: A "pair" snippet is defined so that by typing "pair" and hitting Tab, an ordered pair is created so that the user may quickly type things like (1, 2) or (a, b). The user begins typing an ordered pair, but then aborts the operation after typing the first element and proceeds to move to the next line. The user indents this second line.
Expected behavior: After exiting insert mode, UltiSnips should've "forgotten" that the user was mid-snippet and not interfered. The second line should be indented.
Actual behavior: Even after exiting and re-entering insert mode, UltiSnips stubbornly insists that the user complete his snippet, and interprets the Tab keystroke as a snippet location jump, not an indentation.
Perhaps this is a difference in preference, but there should at least be a configuration option to make UltiSnips "forget" when the user is mid-snippet after leaving insert mode. With the current "sticky/stubborn" behavior, UltiSnips becomes harder to predict as a user.
I'm not use ultisnips for a while, but It actually happens on many completion plugins I guess it's relevant to pumvisible
.(so not coc.nvim only)
Issue occurs without
coc.vim
. One can reproduce the error without any other plugins loaded.
I posted several github issues, for example: https://github.com/SirVer/ultisnips/issues/1400. It has not been addressed. This happens in Neovim/Vim, and in other distros like Ubuntu, Arch or Manjaro so it's definitely an Ultisnips problem.
Expected behavior:
After I enter, it should jump to next placeholder or jumpout, but sometimes it will enter select mode and select the nearest text.
Actual behavior:
As I say, it should jump out
Steps to reproduce
enter 'kk' to '$I$", where I is the cursor, then enter 'sigma' to '$\sigmaI$' , and then enter'
The related snips are: