robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
fe5d1279a4
master
1" Maintainer: Maxim Kim <habamax@gmail.com> 2" Converted from vim9script 3" Last Update: 2024-06-18 4 5if ! exists ( "b:csv_delimiter" ) 6" detect delimiter 7let s: delimiters = ",;\t|" 8 9let s: max = 0 10for s: d in s: delimiters 11let s: count = getline ( 1 ) ->split ( s: d ) ->len () + getline ( 2 ) ->split ( s: d ) ->len () 12if s: count > s: max 13let s: max = s: count 14let b: csv_delimiter = s: d 15endif 16endfor 17endif 18 19if exists ( "b:did_ftplugin" ) 20finish 21endif 22let b: did_ftplugin = 1