Tab separated fields

11 views
Skip to first unread message

c.wil...@btinternet.com

unread,
Dec 6, 2020, 11:37:41 AM12/6/20
to vim...@googlegroups.com

Hi


are there commands to work in the nth tab separated field (like awk)? As I understand it block visual doesn't do this.


regards - Chris

Salman Halim

unread,
Dec 6, 2020, 11:47:16 AM12/6/20
to Vim Users
There is a really useful plugin you can download off http://vim8.org called csv.vim. I believe you can change the separator from comma to tab, though I haven't tried it with anything but commas.

Even if you can't change the separator, you could always do a global substitution to replace all tabs with commas, do your work and then do another substitution to replace all commas with tabs. If you're concerned about actual commas that may be in your text, you could first do a substitution to replace them with the word COMMA so they are retained. 

--

Salman

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7087ee99.15fd.17638ea5a61.Webtop.223%40btinternet.com.

Paul

unread,
Dec 6, 2020, 1:07:39 PM12/6/20
to Vim Users
On Sun, Dec 06, 2020 at 11:46:52AM -0500, Salman Halim wrote:
>There is a really useful plugin you can download off http://vim8.org called
>csv.vim. I believe you can change the separator from comma to tab, though I
>haven't tried it with anything but commas.

I'm not sure what was meant by "work within the nth tab separated field", but the plugin I believe you're referring to is https://github.com/chrisbra/csv.vim
signature.asc

c.wil...@btinternet.com

unread,
Dec 6, 2020, 2:34:18 PM12/6/20
to vim...@googlegroups.com
Hi Salman and Paul

thanks. That looks as if it is what I want.


regards - Chris --
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201206180729.GB5992%40rainslide.net.

Gabriele F

unread,
Dec 7, 2020, 3:49:33 PM12/7/20
to vim...@googlegroups.com
On 06/12/2020 19.07, 'Paul' via vim_use wrote:
> I'm not sure what was meant by "work within the nth tab separated field",

I believe he means by using nth-tab fields as motions or text objects.

Reply all
Reply to author
Forward
0 new messages