Skip to content

Commit

Permalink
Add rainbow CSV highlighting rules (12 column coverage)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-v committed Jan 4, 2019
1 parent 79ac0ca commit 56106c7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions csv.nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Rainbow CSV highlighting rules (12 column coverage)
# Inspired by https://github.com/mechatroner/rainbow_csv
syntax "CSV" "\.csv$"

color brightmagenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightcyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightblue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightyellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightgreen "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color brightred "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
color cyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color magenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color blue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
color yellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?"
color green "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?"
color red "^("([^"]*"")*[^"]*",?)|^([^,]*,?))?"

0 comments on commit 56106c7

Please sign in to comment.