Adri Verhoef wrote:
> I think there is a problem here, namely that the BOM (Byte 
> Order Mark, see :help 'bomb') is transferred to the shell 
> command, when it shouldn't.  In my opinion Vim should be able 
> to temporarily remove the BOM, then execute the shell 
> command, and finally place the BOM back at its original 
> place, at the beginning of the file.

I can't follow the logic of that. If a BOM is requested, then it will be 
inserted if
the file is saved. Sending it to an external program requires that the file be
saved, and the whole point of the BOM is to tell the external program what 
encoding
to use.

If the external program can't understand BOMs, then don't ask Vim to insert one.

Anyway, the good news is that you don't need !sort anymore. You should be using 
Vim
7.1 in which case the following works (since 7.0 I think):

  :sort    (sort whole file)
  :sort u  (sort and keep only unique lines)
  :help :sort

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui