sponsor Vim development Vim logo Vim Book Ad

csv reader : Read csv file (comma or tab, choosable), easy to move to every column in color.

 script karma  Rating 10/8, Downloaded by 865  Comments, bugs, improvements  Vim wiki

created by
Hongli Gao
 
script type
utility
 
description
When you open a .csv file, you can read it more easy, this script make the current column
highlighting, and you can jump to the field that you want or select the comma or tab as the split symbol.
[ Some code come from network, and I like to share this with you. Thanks, every body. ]

F9: move to ahead column
F10: move to next column
F11:jump to field
F12: select the split symbol, you can directly push the enter as input comma, or type comma or tab.
 
install details
step1;  put the readcsv.vim into your plugin folder.

step2;  add below line into your .vimrc

autocmd BufNewFile,Bufread *.csv call CSVSELECT()
map <F9> :call CSV_HighlightPrevCol()<CR>
map <F10> :call CSV_HighlightNextCol()<CR>
map <F11> :call CSV_goto_field()<CR>
map <F12> :call CSV_SE()<CR>

step3; Now ',' is default. If you use comma as default, you need not do this.

there is a way to set it use 'tab' by default.
open  readcsv.vim
find almost last line,  change the line

call CSVSettings()
to be
call CSVTabs()  
 

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
readcsv.zip 6.0 2007-12-25 7.0 Hongli Gao Initial upload
ip used for rating: 3.141.29.145

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.
   
Vim at Github