Vim Kung-Fu
Tom H
tomh0665 at gmail.com
Sun Oct 17 20:43:33 UTC 2010
On Sun, Oct 17, 2010 at 4:01 AM, Loïc Grenié <loic.grenie at gmail.com> wrote:
> 2010/10/17 Christopher Lemire <christopher.lemire at gmail.com>:
>> On Sun, Oct 17, 2010 at 12:26 AM, Tom H <tomh0665 at gmail.com> wrote:
>>> On Sun, Oct 17, 2010 at 1:02 AM, Christopher Lemire
>>> <christopher.lemire at gmail.com> wrote:
>>>>
>>>> My contacts list in google (used for most google web apps, google
>>>> voice, gmail, etc.) is very messy. I could edit it through google on
>>>> the web, but that is tedious. I exported the contacts list in all 3
>>>> available formats. None are very readable or understandable. I'd like
>>>> to edit with vim (mostly in command mode) one of these files, and then
>>>> import it back into Google. I googled "edit cvs OR vcf with vim" and I
>>>> came up with unrelated search results, mostly CVS as in Control
>>>> Version System. Any thoughts? How can this be done?
>>>
>>> It's not cvs but csv as in comma-separated values.
>>>
>>> It might be easier to edit one of the csv files in OO, or at least
>>> prep it in OO because you probably have many unused fields/columns and
>>> then edit it with vi.
>>>
>>> --
>>> ubuntu-users mailing list
>>> ubuntu-users at lists.ubuntu.com
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>>
>>
>> I'm not sure what you are getting at? How does one edit something in
>> OpenOffice using vim. If the format of these files was a little more
>> clear, readable, then I would go ahead and use vim/gvim to edit them.
>> Perhaps there is some type of conversion for these files. I can
>> convert them to a better formatting for editing, and then when I am
>> done, convert it back and import the file back to google.
>
> His suggestion was to use OpenOffice *instead of* vim. The .csv format
> is a spreadsheet format so that OpenOffice Calc organizes the data in
> a nicer way. However you loose all the vim goodness obviously.
>
> The .csv format is the following: you have a table, rows are separated by
> CR+NL (DOS newline) and inside each row the columns are separated by
> commas. The first row gives the column titles. It's probably difficult to edit
> using vim, it really depends on what you want to do.
My suggestion was to use OO then vi since the OP wanted to use. OO has
regex support if part of the OP's plan is to use regexes.
However I hadn't understood what the OP was after until this email. "I
exported the contacts list in all 3 available formats. None are very
readable or understandable." vi cannot align the data in columns the
way that Google or OO can. So even if you delete the unused columns,
when you edit the file in vi, you'll still have a visual mess but a
less complex one.
(I hope that you're wrong about the line endings and that a csv file
in Linux doesn't have DOS line endings!)
More information about the ubuntu-users
mailing list