Re: Vim and text file line ending handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 7/8/2011 4:40 PM, Lars Hecking wrote:
>
>   I'd also love to teach vim how sto how those pesky ^M characters.

It does, when the line ending style is mixed.

When the line ending style is consistent, you can make Vim show the file 
type in the status line by adding something like this to your .vimrc:

set laststatus=2
set statusline=%F\ %m%r%h%w%y\ [%{&ff}]\ [%l,%v]\ [%p%% of %L lines]

The important bit is the %{&ff}: that will be "dos", "mac" or "unix". 
The brackets around it are decorations only.  Adjust to taste.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux