New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't make UltiSnips to set <tab> as jump forward trigger #1554
Comments
I'm not sure about the specifics of your case, but I just thought I'd share that I was having a similar problem recently because I was trying to define the remap in a config file set in a snips.lua file in the "after" folder specifically for UltiSnips, like I do for most config stuff. I found that the was working for expanding but not jumping and wasn't sure why. I ended up putting
in my init.lua and everything works fine now like I was trying to get it. Perhaps doing separate commands for forward and expand would work? Or moving it to a piece of your config that initializes sooner, if you're having a problem I was having? I'm not exactly sure but I thought I'd share. Sorry I can't help more. |
@AshyAspen I tried moving commands to init.lua file and tried separate commands. It still would not work. Thanks for suggestion though. I also noticed that I still don't have any idea what could be wrong here. I checked my config several times, all I have there is simple stuff like setting colorscheme, line numbers... and few other maps that don't use |
I have figured these out. I changed my ultisnips.lua file to have
Everithing works as it should now. |
Glad you made it work. I do not use Neovim and it is officially not supported by UltiSnips, hence i could not have helped in either case. |
I want to set
<tab>
for both to expand and jump forward but it seems likevim.g.UltiSnipsExpandOrJumpTrigger = '<tab>'
does not work.I thought that other maps could get in the way or it might be due to the conflict with other plugins, but I don't use
<tab>
in any other maps and I have tried deleting other plugins (left only VimTex and UltiSnips), It still would not work. Later I found that this does not work for any keys not just for<tab>
.vim.g.UltiSnipsJumpBackwardTrigger = '<s-tab>'
works fine though.I use lazy.nvim as my plugin manager. I have tried updating UltiSnips but it says it's up to date.
I have tried more direct way and I changed my ultisnips.lua file inside my plugins folder to have
This works with other keys (
<c-k>
for example ) but not with<tab>
(also this does not remove default mappings obviously). When I try to set<tab>
this way and use command:imap<tab>
it gives me<C-R>=UltiSnips#ExpandSnippet()<CR>
instead of<C-R>=UltiSnips#ExpandSnippetOrJump()<CR>
.NVIM v0.10.0-dev-3020+g435dee74b
Build type: RelWithDebI
The text was updated successfully, but these errors were encountered: