Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a list of items in a text file separated by 1 (one) tab character like this:

item one[tab]item two

Each item doesn't have the same length in characters. So a traditional column selection doesn't work. The block selection must stop at the "tab" character at each line.

How do a do it?

I'm using Windows 7. I would prefer to use a text editor than a spreadsheet program (as i already though of that).

User "Paul Lammertsma" offered a partial solution. I'm still hoping for a complete solution. I decided to add this comment and clarify my question a lit bit.

share|improve this question

2 Answers 2

There are several text editors that allow for block selection. I'm not entirely sure if this would resolve your problem (if the text is wider than a tab, you will select text in other columns).

Context is a very simple editor that lets you do this by holding Alt while dragging. As a workaround for the problem above, you can set the tab width to the maximum of 32 in the Environment Options.

Notepad++ is a more flexible (and still actively developed) editor, which works in a similar way.

share|improve this answer
    
Increasing the "tab size" in Notepad++ preferences allow me to achieve what i wanted. Thank you. Still i would have prefer that column/block selection would stop at the tab character at each line. –  Zadat Feb 4 '11 at 2:19
    
Of course you could always use an advanced editor such as Vim. This related question just popped up about an hour ago, using just that. –  Paul Lammertsma Feb 4 '11 at 10:53

I think the quickest way would be to use a spreadsheet program. Import it into Excel as a tab-separated file - that will give you your two columns.

In Excel 2007 you'd do it by clicking Data -> Get External Data -> From text

Choose your file, and then in the Text Import Wizard, choose Delimited, and make sure you have Tab selected as your delimiter, then click Finish.

share|improve this answer
    
Yes, i knew that. I explained it in my question. The previous answer offered a partial solution. Thank you for your answer. –  Zadat Feb 4 '11 at 2:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.