Mapping UltiSnipsJumpForwardTrigger to <C-H> causes problems with placeholders
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Description:
When UltiSnipsJumpFo
How to reproduce:
1. Add
let g:UltiSnipsJump
to your .vimrc file.
2. Open a file in vim (filetype should have some snippets defined).
3. Expand a snippet that has some placeholders.
4. Press C-H a few times.
Expected result:
C-H should jump to the next position in the snippet, leaving placeholders unchanged.
Actual result:
C-H jumps to the next position, but if a placeholder is selected, the text will be deleted. Pressing C-H again will jump to the next position.
More details:
I tracked down this issue to plugin/
snoremap <silent> <c-h> <c-g>c
Commenting out this line makes it work as expected. Tested with Konsole (XFree 4 key bindings) and xterm.
Changed in ultisnips: | |
status: | Expired → Won't Fix |
You'll find that it works as expected in gvim. the reason is that <c-h> is the default escape sequence for backspace in old terminals and therefore terminal emulators do exactly that. Some emulators can be told to pass this control sequences on, but most can't.
Sorry, either use gvim or switch your terminal emulator (no idea which one can be used in linux though, on mac iterm2 should be able to do this).