Vim: Encoding (Unicode) in Terminal under Windows

前端 未结 2 1328
后悔当初
后悔当初 2020-12-23 22:08

I don\'t know why, but this topic seems to be badly documented and is covered with controversies as nobody knows the real answer (except for maybe Mr. Moolenaar, who rarely

相关标签:
2条回答
  • 2020-12-23 22:27

    There was recently a patch for "Windows 8 IME in console Vim". It was cleaned up by mattn and posted here: https://gist.github.com/mattn/8312677

    It was included with 7.4.142. Does that version fix your issue?

    0 讨论(0)
  • 2020-12-23 22:36

    I've wondered about this myself too and in the past tried ConEmu and gave up after struggling to get console vim with 256 colors and fancy fonts working on it.

    So today I tried out for sometime again and surprise, surprise - things seem to be working. Given all the extreme sensitiveness to versions, I'm going to try and list down versions of everything

    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  1 2014 09:38:34)
    MS-Windows 32-bit console version
    Included patches: 1-389
    Compiled by raghuramanr@ADITI
    

    ConEmu

    140723 Alpha
    

    Windows: Win 7x64

    ConEmu settings in .vimrc:

    " ConEmu
    if !empty($CONEMUBUILD)
        echom "Running in conemu"
        set termencoding=utf8
        set term=xterm
        set t_Co=256
        let &t_AB="\e[48;5;%dm"
        let &t_AF="\e[38;5;%dm"
        " termcap codes for cursor shape changes on entry and exit to
        " /from insert mode
        " doesn't work
        "let &t_ti="\e[1 q"
        "let &t_SI="\e[5 q"
        "let &t_EI="\e[1 q"
        "let &t_te="\e[0 q"
    endif
    

    Steps:

    chcp 65001
    vim.exe
    

    I still can't get a blinking cursor in vim which is confusing. Still better than before when stuff would be messed up.

    0 讨论(0)
提交回复
热议问题