chrisbra / csv.vim

A Filetype plugin for csv files

Home Page:http://www.vim.org/scripts/script.php?script_id=2830

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto Alignment Per Buffer

acamso opened this issue · comments

Hi, thanks for the great plugin. I am looking to set the alignment (b:csv_arrange_align) automatically for each individual buffer/file since the alignment needed varies. I was wondering if there's a recommended way to go about doing this. I found another plugin that allows setting variables in the modeline, but would rather not do that. Also, dhruvasagar/vim-table-mode allows a character to be added to statically set each column individually. Was wondering if that could be a possible enhancement.

Cheers

@chrisbra

I have two files: 1.csv 2.csv - I need let b:csv_arrange_align='l*' for 1.csv and let b:csv_arrange_align='lc*' for 2.csv to be set automatically. I was wondering if there was a recommended way to handle this (alignment for each individual buffer).

can you not use BufEnter autocommands for that?

can you not use BufEnter autocommands for that?

Yes can do that as well but could be a pain with alot of files. Turns out setting variables in the modeline is working great.

Appreciate the plugin!