diff --git a/plugin/mdip.vim b/plugin/mdip.vim index 39d0a7e..6a5b64e 100644 --- a/plugin/mdip.vim +++ b/plugin/mdip.vim @@ -131,7 +131,11 @@ function! mdip#MarkdownClipboardImage() " let relpath = SaveNewFile(g:mdip_imgdir, tmpfile) let extension = split(tmpfile, '\.')[-1] let relpath = g:mdip_imgdir . '/' . g:mdip_tmpname . '.' . extension - execute "normal! i![Image](" . relpath . ")" + execute "normal! i![I" + let ipos = getcurpos() + execute "normal! amage](" . relpath . ")" + call setpos('.', ipos) + execute "normal! ve\" endif endfunction