I'm working with a CSV that's just shy of 1 GB. I want to see the the file's structure and a sample of the data, but I don't want to open the entire file. How can I load the first few rows in Vim? If it makes a difference, I'm using MacVim.
I generally use a command like head
or tail
for seeing partial content of large files.
$head -10 <large file>
If you must do it from vim, use this:
:r !head -10 path/to/big.file
That would get the first 10 lines of big.file and insert them into the current buffer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With