Skip to content
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

Verbose map of <C-j> and <C-k> according to documented settings does not work as expected #1497

Open
TryerGit opened this issue Oct 19, 2022 · 1 comment

Comments

@TryerGit
Copy link

Expected behavior:

I have the following vimrc:

if empty(glob('~/.vim/autoload/plug.vim'))
    silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
        \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
call plug#end()

let g:UltiSnipsExpandTrigger = '<C-j>'
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'

This is similar to what is specified in the official documentation here: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt

Once I load this vimrc and open a .tex file, I issue the following commands:

:verbose map <C-j>

I expect this to specify that is mapped to trigger expansion and trigger forward jump.

Likewise, I expect :verbose map <C-k> to indicate that is mapped to trigger backward jump.

Actual behavior:
While :verbose map <C-j> provides expected output that indicates that it has read in the vimrc, :verbose map <C-k> returns that no mapping has been found.

Steps to reproduce

  1. The entire vimrc and sequence of steps has been provided above.
  2. In addition, here is an animated gif that shows the steps I followed and it should be easy to reproduce: https://imgur.com/qkHau09

  • Operating System: WSL Ubuntu 20.04 on Windows
  • Vim Version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
    Included patches: 1-2269
  • UltiSnips Version: 53e1921
  • Python inside Vim: 9,78 All3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
  • Docker repo/vimrc: vimrc provided above
@BertrandSim
Copy link

These mappings are autoloaded, that is, the mappings are only created after UltiSnips has been loaded. Try expanding a snippet first before inspecting :verbose imap <c-j>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants