iamcco / markdown-preview.vim

⚠️ PLEASE USE https://github.com/iamcco/markdown-preview.nvim INSTEAD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mapping MarkdownPreview doesn't work in insert mode

kubouch opened this issue · comments

I have the following settings in my .vimrc:

let g:mkdp_command_for_global = 1
nmap <silent> <F8> <Plug>MarkdownPreview
imap <silent> <F8> <Plug>MarkdownPreview
nmap <silent> <F9> <Plug>StopMarkdownPreview
imap <silent> <F9> <Plug>StopMarkdownPreview

Pressing F8 in insert mode opens a new Chrome tab with an empty preview. The tab can't be closed with F9 in any other mode. Both F8 and F9 work as expected in normal mode. Mapping to different key combos doesn't solve the problem.

Otherwise a great plugin! Definitely the best one from the few I've tried.

sorry i can‘t reproduced this. maybe it's some issue when lanuch the service and browser

I tested it on two computers (Arch Linux and a musl-based Void Linux), both running dwm window manager and chromium web browser provided by the package manager.