Closed xvzc closed 11 months ago
When i expand snippet and leave the insert mode before i jump forward to ${0}, the place holder still remains so that CanJumpForward() returns 1. My current configuration is like below.
${0}
CanJumpForward()
let g:UltiSnipsExpandTrigger="<Nop>" let g:UltiSnipsJumpForwardTrigger="<Nop>" let g:UltiSnipsJumpBackwardTrigger="<Nop>" inoremap <silent><expr><nowait> <Tab> \ UltiSnips#CanJumpForwards() ? "\<C-r>=UltiSnips#JumpForwards()\<CR>" : \ UltiSnips#CanExpandSnippet() ? "\<C-r>=UltiSnips#ExpandSnippet()\<CR>" : \ "\<Tab>" snoremap <buffer><silent><nowait> <Tab> <Esc>:call UltiSnips#JumpForwards()<CR> inoremap <silent><expr><nowait> <S-Tab> \ UltiSnips#CanJumpBackwards() ? "\<C-r>=UltiSnips#JumpBackwards()\<CR>" : \ "\<C-d>" snoremap <buffer><silent><nowait> <S-Tab> <Esc>:call UltiSnips#JumpBackwards()<CR>
Expected behavior:
snippet fori for (int ${1:i} = ${2:0}; $3; ${4:++}$1) { ${0} } endsnippet
${2}
<Tab>
Actual behavior:
${3}
Steps to reproduce
b393ba65386d47664421e1f8b246a87a6e8b218c
Python 3.11.6
Solved
When i expand snippet and leave the insert mode before i jump forward to
${0}
, the place holder still remains so thatCanJumpForward()
returns 1. My current configuration is like below.Expected behavior:
${2}
<Tab>
Actual behavior:
${2}
<Tab>
${3}
Steps to reproduce
b393ba65386d47664421e1f8b246a87a6e8b218c
Python 3.11.6