I've reassigned the default <C-T>
mapping for :pop to the CtrlP fuzzy finder, as my Sublime Text use means I hit that instead of <C-P>
every time. I also use the default <C-]>
mapping for Ctags, but when I try to reassign :pop to <C-[>
as so:
nmap <C-[> :pop<CR>
the mapping works, and pressing <C-[>
correctly pushes me back up the tree, but using the arrow keys now adds random characters into my buffer. With that single line commented out the arrow keys work correctly. Anyone have any ideas as to why this mapping would cause this behaviour? I can post the full .vimrc and list of plugins used if needed.
The problem is that <C-[>
is the same as <Esc>
.
You can check that by entering insert mode and hitting <C-V>
+<C-[>
and <C-V>
+<C-[>
(it is possible that you need to use <C-Q>
instead of <C-V>
).
You should try using a different key, as the Esc is part of the keycode of other keys. You may find this link helpful: Vim FAQ: 20.4. I am not able to create a mapping for the key. What is wrong?