Vim and extended ASCII characters?

I would like to know how I can install VIM 7.0 to demonstrate and work with extended ASCII characters without problems.

+3
source share
4 answers

Vim (which is what is allowed vion most systems) easily supports extended character sets. You may need to specify the Vim whose encoding is used.

This is controlled by two parameters:

:set encoding
:set fileencoding

If you uploaded the wrong file, you can use it :set encoding=<new encoding>to force encoding. This changes the interpretation of characters on the fly. If you want to save the file in a different encoding while maintaining the current interpretation of the characters, use set fileencoding=<new encoding>Vim to save the file in this encoding.

utf-8 .vimrc.

+4

"", ASCII.

: vim. ": help unicode" .

+3

:

  • utf-8 ( , , PuTTY Window/Translation)

  • utf-8 ( , , Debian set LC_ALL=en_GB.UTF-8 sudo dpkg-reconfigure locales ) - locale.

( VIM 7.1.314 no .vimrc).

0

Other solutions here did not work for me. Vim told me that encodingand are fileencodingnot supported. This turned out to be because I built the source myself, and I did not enable the multibyte function. My two Macs are similar, but one of them turned it on by default, and the other did not.

If you are creating Vim from a source like me, include --enable-multibytein your arguments in ./configure. In my case, Vim used UTF-8 by default and supported extended characters after that.

0
source

Source: https://habr.com/ru/post/1725950/


All Articles