Skip to main content
Planned maintenance impacting Stack Overflow and all Stack Exchange sites is scheduled for Monday, September 16, 2024, 5:00 PM-10:00 PM EDT (Monday, September 16, 21:00 UTC- Tuesday, September 17, 2:00 UTC). The email/password authentication method will be unavailable for logging in and registering. Read more here
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
Vivian De Smedt's user avatar
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 ...
romainl's user avatar
  • 41.8k
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 ...
Vivian De Smedt's user avatar
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'
Vivian De Smedt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible