1

I need to edit a file having columns

1       0       0       0       1       1       0       0       1       1       1       1       
1       1       0       1       0       0       0       1       0       0       0       0             
1       0       0       0       1       1       0       0       1       1       1       1       
1       1       0       1       0       0       0       1       0       0 

      0       0        

it is a portion of file.

what I want is to add some comments on top of it, and then after every two line add a label e.g:

Z A B C D E F
MMSSSS
#A
1       0       0       0       1                 
1       1       0       1       0                
#B
1       0       0       0       1       
1       1       0       1       0     

how can I do it in vim as I have 400 columns's line and when I open vim each row is spread accross many lines of screen.

5

I understand your question as your long lines being wrapped around and you can't easily see where the two lines for the comments start and end. There are various options: 1) activate line numbers with :set nu, or 2) prevent wrapping by :set nowrap. What is preferable depends on whether you want to see the whole lines without scrolling or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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