csv.vim
csv.vim copied to clipboard
`:Header` in `autocmd`?
trafficstars
Hi,
When I try the following lines in my .vimrc:
autocmd BufRead *.csv:
\ Header
-- nothing happens. (What I want this to do is to have :Header happen automatically on opening a csv file).
I am not an expert of vim, so I am not sure if this is my bad or a bug?
Thanks!!
yeah, by the time the vimrc file has been sourced, Vim does not know yet the csv functions. You may want to try this instead:
aug CSV_Editing
au!
au BufRead *.csv :call csv#Init(1,'$',0) | call csv#SplitHeaderLine('', 0,1)
aug end