iamcco / markdown-preview.vim

⚠️ PLEASE USE https://github.com/iamcco/markdown-preview.nvim INSTEAD
792 stars 75 forks source link

Mapping MarkdownPreview doesn't work in insert mode #79

Open kubouch opened 5 years ago

kubouch commented 5 years ago

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.

iamcco commented 5 years ago

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

kubouch commented 5 years ago

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.