Reputation: 109
I used classic vim, but recently i moved to gtk-vim on ubuntu, but emmet plugin don't working, it is because when I press <C-Y>
it copies above char to cursor position, i failed to disable it. When i set unmap or iunmap <C-Y>
it writes that there is no maping, also this shortcut is not noted in imap.
EDIT: I find out that i'm unable to imap, when i press any shortcut it just print it out, for instance
map <F2> :echo 'Current time is ' . strftime('%c')<CR>
is working well but
imap <F2> :echo 'Current time is ' . strftime('%c')<CR>
is printing <F2>
to text
Upvotes: 0
Views: 205
Reputation: 172698
It looks like you've :set paste
, which disables insert mode mappings and abbreviations. This option is meant for pasting text from the terminal (e.g. via middle mouse button); it should only be set during the paste itself, not permanently (and you can easily toggle this via the 'pastetoggle'
option).
So, check via :verbose set paste?
, then find the place where this is set, and disable it.
PS: Your demo imap needs <C-o>
before it; else (if imaps are working, that is), you'd just insert the :echo ...
into the buffer.
imap <F2> <C-o>:echo 'Current time is ' . strftime('%c')<CR>
Upvotes: 2