Friday, August 4, 2017

Map CTRL-[ to CTRL-T, is it possible

Hello, I would like to map CTRL-[ to do the same action as CTRL-T, or in other words
to go back one step in the tag stack, doing a :pop command.
It makes a lot of sense to me to use CTRL-] to go forward and CTRL-[ to go backwards
in the stack.

But for vim ESC and CTRL-[ seems to be the same keystroke and when I map  CTRL-[
it also affects the ESC key, so I can't get out from insert mode using it anymore.
Is there any way to accomplish this?
This is how I am mapping CTRL-[ now:

nnoremap <silent> <C-[>   <C-T>
vnoremap <silent> <C-[>   <C-T>
inoremap <silent> <C-[>   <C-T>

Thanks.
--
Un saludo
Best Regards
Pablo Giménez

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: