~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/doc/usr_45.txt

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*usr_45.txt*    For Vim version 7.2.  Last change: 2008 Apr 30
 
1
*usr_45.txt*    For Vim version 7.2.  Last change: 2008 Nov 15
2
2
 
3
3
                     VIM USER MANUAL - by Bram Moolenaar
4
4
 
265
265
 
266
266
Suppose you have setup Vim to use Unicode, and you want to edit a file that is
267
267
in 16-bit Unicode.  Sounds simple, right?  Well, Vim actually uses utf-8
268
 
encoding internally, thus the 16-bit encoding must be converted.  Thus there
 
268
encoding internally, thus the 16-bit encoding must be converted, since there
269
269
is a difference between the character set (Unicode) and the encoding (utf-8 or
270
270
16-bit).
271
271
   Vim will try to detect what kind of file you are editing.  It uses the
283
283
When you start editing that 16-bit Unicode file, and it has a BOM, Vim will
284
284
detect this and convert the file to utf-8 when reading it.  The 'fileencoding'
285
285
option (without s at the end) is set to the detected value.  In this case it
286
 
is "ucs-2le".  That means it's Unicode, two bytes and little-endian.  This
 
286
is "utf-16le".  That means it's Unicode, 16-bit and little-endian.  This
287
287
file format is common on MS-Windows (e.g., for registry files).
288
288
   When writing the file, Vim will compare 'fileencoding' with 'encoding'.  If
289
289
they are different, the text will be converted.