From: Sergey Vlasov <vsu@altlinux.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] VIM: how can I edit files in different character sets?
Date: Sat, 22 Jul 2006 20:12:48 +0400
Message-ID: <20060722161248.GC15421@procyon.home> (raw)
In-Reply-To: <20060722195350.3cf0f1fd@greg.com.ru>
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
On Sat, Jul 22, 2006 at 07:53:50PM +0400, Grigory Fateyev wrote:
> из .vimrc
> set wildmenu
> set wcm=<Tab>
> menu Encoding.koi8-r :e ++enc=koi8-r<CR>
> menu Encoding.windows-1251 :e ++enc=cp1251<CR>
> menu Encoding.ibm-866 :e ++enc=ibm866<CR>
> menu Encoding.utf-8 :e ++enc=utf-8 <CR>
> map <F8> :emenu Encoding.<TAB>
>
> жмём F8 и выбираем нужную кодировку.
Это годится для переоткрытия файла в нужной кодировке. Если же нужно
сохранить уже отредактированный файл в другой кодировке, надо перед
сохранением установить требуемое значение переменной fileencoding
(сокращённое имя fenc) - например:
:set fenc=koi8-r
:w
(Переменная fileencoding всегда локальная для буфера, поэтому setlocal
писать не обязательно.)
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
prev parent reply other threads:[~2006-07-22 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-22 15:34 Минц Михаил Михайлович
2006-07-22 15:46 ` Damir Shayhutdinov
2006-07-22 15:53 ` Grigory Fateyev
2006-07-22 16:12 ` Sergey Vlasov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060722161248.GC15421@procyon.home \
--to=vsu@altlinux.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git