On Thu, 11 Mar 2010, Christian Brabandt wrote: > On Do, 11 Mär 2010, Benjamin R. Haskell wrote: > > > Is there a filetype or way to set vim up nicely for tab-delimited > > files? What I'm looking for is to have tab characters force > > vertical alignment of the following characters. E.g., using » to > > indicate the tabs, I'd like the following: > > Try http://www.vim.org/scripts/script.php?script_id=2830 > > Then open your file and > 1) :let g:csv_delim="^I" > 2) :InitCSV > 3) :ArrangeColumn > > (^I represents the character Tabulator, and not the 2 letters ^ and I)
Using that sequence, I seem to lose all my tabs. e.g., after step 3), this logical text (again, » = <Tab>): 0»1»1.00»101010 1»2»1.00»101010000101 which shows up with my default settings (listchars='tab:»·,trail:·') as: 0»··1»··1.00»···101010 1»··2»··1.00»···101010000101 becomes: 0 1 1.00 101010······· 1 2 1.00 101010000101· ...ah, and after composing that, I see why: In ArrangeCol, there's this comment: " If a delimiter is a <Tab>, replace it by Space (and then it does) Possible bug: Even without the :ArrangeColumn, :SearchInColumn 4 /0000/ doesn't find the 0000 in the fourth column. (Though this works: :SearchInColumn 3 /00/) The plugin also seems to handle all of those horrible CSV quoting rules. (Which, of course, it should, for editing CSV data) That's the main reason I vastly prefer tab-separated. (And the many *nix tools that operate on tab-separated.) Thanks anyway for pointing this out (I'm keeping it installed for true CSV). -- Best, Ben -- 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
