4
votes
Ignoring the first line of a csv file when sorting in Vim
You can do:
:2,$!sort -t ',' -k9,9 -k8,8 -k10n -k2n -k3n -k4n -k5n -k6n -k7n
3
votes
Accepted
How to predefine functions in syntax file?
Vimscripts are sourced one line at a time, from top to bottom, so "things" have to be defined before they are consumed:
let a = 1
echomsg a
echomsg b
let b = 2
1
E121: Undefined variable: b
...
1
vote
Accepted
csv column colors in Vim 9
I can't reproduce the behavior you mention without a plugin.
The csv.vim plugin provides the behavior you describe in the introduction of your question.
This plugin use only four colors (two for the ...
1
vote
Accepted
How to use variable in syntax match
I would use the execute statement:
execute 'syn match csvField1 /[^' . g:separator . ']*' . g:separator . '\?/ display nextgroup=csvField2'
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
filetype-csv × 6syntax-highlighting × 2
vimscript × 1
colorscheme × 1
replace × 1
functions × 1
variables × 1
find × 1
sort × 1
plugin × 1
search-replace × 1
vim9 × 1
plugin-csv × 1