I want to remap <C-I>
to print markdown *
symbol around the previous word. For example:
# user actions inside <...>
some text typed in vim insert mode<cursor_position> <C-I>
# expected vim output
some text typed in vim insert *mode*<cursor_position>
I am using the following line in my .vimrc
for remapping
inoremap <C-i> <ESC>Bi*<ESC>ea*
Problem is, as per help :h i_CTRL-I
, <C-I>
in insert mode is already mapped to something and the mapping above doesn't work for me. Pressing <C-I>
in insert mode leaves a <TAB>
on editor.
<Tab>
or CTRL-I Insert a tab. If the 'expandtab' option is on, the equivalent number of spaces is inserted (use CTRL-V to avoid the expansion; use CTRL-Q<Tab>
if CTRL-V is mapped i_CTRL-Q). See also the 'smarttab' option and ins-expandtab.
- How do I make insert mode
<C-I>
mapping work? - How can I override global vim key-mapping with my own key-mapping defined in
.vimrc
file?