vim 编辑中的错误,由制表符或变音符号引起?

vim 编辑中的错误,由制表符或变音符号引起?

我在文件中有以下行(注意开头的选项卡):

    $q = "select pl.id, pl.pltag tag, tf.nome família, tg.nome Gênero, ts.nome espécie, l.nome localidade

当我尝试编辑它时,假设将 Gênero 替换为 gênero,我将光标向上移动到“G”,将“插入”更改为“替换”(再次按插入键),然后在其上键入“g”。看起来它有效,但是当我退出并保存时,我发现该文件现在有:

tg.nomeGgênero

看起来第一个选项卡让 Vim 感到困惑?或者葡萄牙语中使用的变音符号(Postgresql 接受)?我在 Ubuntu Desktop 14.04 中使用终端,通过 ssh 连接到另一台装有 Ubuntu Server 14.04 的计算机,我正在其中编辑文件。

尽管 Vim 没有提及任何有关语言环境的信息,但 psql 却说了以下内容:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_PAPER = "pt_BR.UTF-8",
    LC_ADDRESS = "pt_BR.UTF-8",
    LC_MONETARY = "pt_BR.UTF-8",
    LC_NUMERIC = "pt_BR.UTF-8",
    LC_TELEPHONE = "pt_BR.UTF-8",
    LC_IDENTIFICATION = "pt_BR.UTF-8",
    LC_MEASUREMENT = "pt_BR.UTF-8",
    LC_TIME = "pt_BR.UTF-8",
    LC_NAME = "pt_BR.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

也许LC_ALL = (unset)是问题的根源?

stty -a根据评论中的要求,输出:

(我的机器)

speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

(服务器)

speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

相关内容