Trouble mapping <C-j> in Vim with latex-suite

坚强是说给别人听的谎言 提交于 2019-12-04 03:15:56

I suggest two things:

  1. firstly, target the mappings:

    nnoremap <C-j> <C-w>j
    
  2. secondly, find out what mappings interfere (and where they come from) by doing

    verbose nmap <C-j>     
    verbose nmap <C-w>
    verbose nmap j
    

see also :map, :imap, :vmap, :noremap etc.

Mateus Braga

I found the sollution here: How to debug vim mapping overlaps?

You should use

nnoremap <SID>I_won’t_ever_type_this <Plug>IMAP_JumpForward

So the imaps.vim of vim-latex don't remap . You can still have the functionality by mapping to something better.

I have had the same problem; for me, it was behaving weirdly since the <C-j> from vim-latex is mapped for the normal visual and insert modes. I kind of felt that after seeing this answer and checking the 'imaps.vim' file in the '\bundle\vim-latex\plugin' directory. I put the following code in my vimrc and it seems to work.

imap <C-space> <Plug>IMAP_JumpForward
nmap <C-space> <Plug>IMAP_JumpForward
vmap <C-space> <Plug>IMAP_JumpForward
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!