Vim doesn't support unicode?

前端 未结 9 938
余生分开走
余生分开走 2020-12-12 17:34

I\'m trying to get the following into my .vimrc

\" Use the same symbols as TextMate for tabstops and EOLs
set listchars=tab:▸\\ ,eol:¬

Thos

相关标签:
9条回答
  • 2020-12-12 17:49

    I have the following in my .vimrc

    scriptencoding utf-8
    set encoding=utf-8
    

    and that in my .gvimrc

    set listchars=trail:·,precedes:«,extends:»,eol:↲,tab:▸\ 
    

    and works fine(notice there is a space after the ▸\ ).

    0 讨论(0)
  • 2020-12-12 17:52

    I had the same issue with the vim that ships with OS X Lion although it was compiled with multi_byte.

    The issue was the encoding used by vim. I added set encoding=utf-8 in my ~/.vimrc and the issue was solved.

    Ref: Terminal Vim redraw issues in OS X Lion

    0 讨论(0)
  • 2020-12-12 17:54

    Make sure you're using a compatible font. My problem was that inconsolata-g does not support the utf-8 characters in my document.

    also, this was all I needed in my gvimrc:

    set enc=utf-8
    set fileencoding=utf-8
    set fileencodings=ucs-bom,utf8,prc
    set guifont=Monaco:h14
    set guifontwide=NSimsun:h14
    
    0 讨论(0)
  • 2020-12-12 17:55

    Don't forget, if you're running vim in a terminal, make sure the terminal itself is using utf-8 as well.

    0 讨论(0)
  • 2020-12-12 18:03

    I had this issue while being in a screen session. It's gone with setting the following in my .bashrc:

    export LANG=en_US.UTF-8
    
    0 讨论(0)
  • 2020-12-12 18:04

    The accepted answer didn't work for me. Working off of the downloaded source on a Mac running Lion, I went into the src directory and ran:

    make clean
    export CONF_OPT_MULTIBYTE='--enable-multibyte'
    make reconfig
    

    Running: ./vim --version to check for +muti_byte then:

    make install
    

    Via: http://vim.1045645.n5.nabble.com/compiling-vim7-1-huge-version-gets-build-with-normal-version-td1162314.html

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