thinca / vim-quickrun

Run commands quickly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

html can not display correctly in quickrun output window

penn201500 opened this issue · comments

commented

image

commented

seems like linux platform already fixed it:
let g:quickrun_config = {}
let g:quickrun_config.html = {'command' : 'gnome-open'}

but how to fix it in win7 OS ?

Please tell me the reproduce way.

commented

I reproduce this issue , when vim running in a Chinese environment , in most case we will set vim encoding to utf-8 , and run :QuickRun in html file directly , it will appear the above code . when i use the follow vim encoding code:

" try to set encoding to utf-8
if WINDOWS()
    " Be nice and check for multi_byte even if the config requires
    " multi_byte support most of the time
    if has('multi_byte')
        " Windows cmd.exe still uses cp850. If Windows ever moved to
        " Powershell as the primary terminal, this would be utf-8
        set termencoding=cp850
        " Let Vim use utf-8 internally, because many scripts require this
        set encoding=utf-8
        setglobal fileencoding=utf-8
        " Windows has traditionally used cp1252, so it's probably wise to
        " fallback into cp1252 instead of eg. iso-8859-15.
        " Newer Windows files might contain utf-8 or utf-16 LE so we might
        " want to try them first.
        set fileencodings=ucs-bom,utf-8,utf-16le,cp1252,iso-8859-15
    endif

else
    " set default encoding to utf-8
    set encoding=utf-8
    set termencoding=utf-8
endif
scriptencoding utf-8

after i delete this block , the vim shows 'HTML不是内部或外部命令...' ans so on.
I can't fix it because i need the utf-8 encoding to show chinese.