How to shortcut diamond character in vim

Posted by temujin.ya.ru on Stack Overflow See other posts from Stack Overflow or by temujin.ya.ru
Published on 2010-05-05T09:44:57Z Indexed on 2010/05/05 9:48 UTC
Read the original article Hit count: 243

Filed under:
|

In the dictionary file, which I am editing I often need to insert character "?" on place of <>. Is there a way to map "?" to some key so that I press "r" for replace and then my_shortcut to have <> replaced by "?"? I found a way to make imap mapping in .vimrc:

:imap <> ?

But changing to inset mode is sub-optimal, would that be possible to make it all in replace mode and what should I write in .vimrc for that?

© Stack Overflow or respective owner

Related posts about vim

Related posts about mapping