sponsor Vim development Vim logo Vim Book Ad

rainbow_csv.vim : autodetect and display csv, tsv, etc file logical columns in different colors

 script karma  Rating 8/5, Downloaded by 333    Comments, bugs, improvements  Vim wiki

created by
Dmitry Ignatovich
script type
Rainbow CSV provides a way to highlight logical columns in different rainbow
colors. This helps to understand data patterns in csv, tsv, etc files more
quickly, especially when fields in the same column have different lengths. Every
10-th column has a default font color, so it's easy to find out column numbers


There are 2 ways to enable csv columns highlighting:
        1. CSV autodetection based on buffer content
        2. Manual CSV delimiter selection

When new buffer is opened Rainbow CSV analyzes it's content and tries to
autodect whether it is a csv file or not; and if it is, what character this
csv is delimited by. This would work only if no other syntax rules has been
set for buffer. Buffer's file extension is irrelevant for autodetection, there
can be no extension at all; or a buffer content could be read by vim from stdin -
autodetection would work in any case.

If autodetection mechanism was disabled or failed for some reason, you can
specify a delimiter manualy: execute command 'RainbowDelim' and a character under
the cursor will be used as the csv delimiter for columns highlighting.

If you don't like default column colors, you can specify your own.

  :RainbowDelim - Manualy select csv delimiter under cursor and highlight columns in different colors
  :NoRainbowDelim - Disable rainbow csv syntax for current buffer.

For more info read a help file.
install details
extract bundle in ~/.vim directory

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
rainbow_csv.zip 1.0 2013-05-25 7.3 Dmitry Ignatovich Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo