I wanted to map <C-j> to switch to the next window below the current one
map <C-j> <C-w>j
However, it goes into Insert mode instead of moving the window below. Why?
Solution attempted:
I have latex-suite installed. So I tried to query what <C-j> is mapped to
:map <C-j>
And I get the following output:
v <NL> <Plug>IMAP_JumpForward
n <NL> <Plug>IMAP_JumpForward
o <NL> <C-W>j
This means that I should change the mapping of <Plug>IMAP_JumpForward. I read around a bit and I found out it's related to the <++> placeholders that you can jump to using <C-j> during Insert mode. So, based on my reading, I learned I could change the mapping using the following line in .vimrc:
imap <C-space> <Plug>IMAP_JumpForward
But no, it doesn't work as <C-j> used to. I'll try to illustrate. I type the following (the _ represents the cursor):
\documentclass{}_
Then I get
\documentclass{_}<++>
Then I try to type in some text
\documentclass{article_}<++>
So now I press <C-space>. This is what happens: it goes out of Insert mode and I'll be in the following situation:
\documentclass{articl_e}<++>
Problem summary:
- After
map <C-j> <C-w>j,<C-j>goes into Insert mode. - After
imap <C-space> <Plug>IMAP_JumpForward,<C-space>doesn't jump to the next<++>placeholder. It goes out of Insert mode and cursor