How do you use a macro to wrap CSV fields in quotes?
Answer
qaf,i"<Esc>la"<Esc>q
Explanation
Record a macro that finds the next comma, inserts a quote before it, moves past the comma, and inserts a quote after. Handles CSV quoting.
qaf,i"<Esc>la"<Esc>q
Record a macro that finds the next comma, inserts a quote before it, moves past the comma, and inserts a quote after. Handles CSV quoting.