vimtricks.wiki Concise Vim tricks, one at a time.

How do you record a macro to extract a specific column from tabular data?

Answer

qa0f dwi\n<Esc>jq

Explanation

Extract columns by recording a macro that navigates to the desired field and deletes or yanks it. Useful for processing CSV/TSV data.

Next

How do you yank a single word into a named register?