diff options
author | Teddy Wing | 2014-06-27 23:26:53 -0400 |
---|---|---|
committer | Teddy Wing | 2014-06-27 23:26:53 -0400 |
commit | efe80dae8fcc95865794d32055a997a479ae81d5 (patch) | |
tree | 582366fbf13120d21630f661e6b7166173ad33fe /vimrc | |
parent | b95652a81bc3c8ce534386772569f65692f9cd86 (diff) | |
download | dotvim-efe80dae8fcc95865794d32055a997a479ae81d5.tar.bz2 |
vimrc: add line ending type to statusline
Show the type of line ending (line feed or carriage return & line feed,
or in vim land unix & dos) in the statusline.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -222,7 +222,10 @@ " * Update <c-h> save mapping in visual mode to reselect the last " selected area " -" +" 2014.06.27: +" * Remove the space after the file encoding in the statusline +" * Add a statusline item that says what line endings are used in the +" current file. "LF" is used for unix, "CRLF" is used for dos. " @@ -297,7 +300,8 @@ set statusline+=%y " Filetype set statusline+=\ " Separator " File encoding " (http://vim.wikia.com/wiki/Show_fileencoding_and_bomb_in_the_status_line) -set statusline+=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\ \"} +set statusline+=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\"} +set statusline+=%{\"[\".(&fileformat==\"unix\"?\"LF\":(&fileformat==\"dos\"?\"CRLF\":\"\")).\"]\ \"} set statusline+=\ " Separator set statusline+=%m " File modified? flag set statusline+=%r " Readonly? flag |