Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Align the line numbers to the filename or if the text is wrapped then align to the beginning of the line. #124

Open
babam86 opened this issue Dec 23, 2017 · 5 comments

Comments

@babam86
Copy link

babam86 commented Dec 23, 2017

Hi,

Align the line numbers with the file names that are compared.

A.text B.text
1 blablabla 1 blablabla
2 blablabla 2 blablabla
3 blablabla 3 blablabla

Thanks.

@jeffkaufman
Copy link
Owner

Hmm, it looks right to me? Can you give an example of how you think it should look?

$ ./icdiff --line-numbers tests/input-{4,5}.txt
tests/input-4.txt                 tests/input-5.txt                
       1 #input, #button {               1 #input, #button {       
       2   width: 350px;                 2   width: 400px;         
       3   height: 40px;                 3   height: 40px;         
                                         4   font-size: 30px;      
       4   margin: 0px;                  5   margin: 0;            
       5   padding: 0px;                 6   padding: 0;           
       6   margin-bottom: 15px;                                    
       7   text-align: center;           7   text-align: center;   
       8 }                               8 }

@babam86
Copy link
Author

babam86 commented Dec 23, 2017

The first character in the filename/path is align with the line numbers.

Sorry, my English is bad.

@jeffkaufman
Copy link
Owner

Right now the filename is left-aligned while the line numbers are right-aligned. So right now we have:

$ ./icdiff --line-numbers <(cat tests/input-{4,4}.txt) <(cat tests/input-{5,5}.txt) --cols=70
/dev/fd/63                         /dev/fd/62                        
       1 #input, #button {                1 #input, #button {        
       2   width: 350px;                  2   width: 400px;          
       3   height: 40px;                  3   height: 40px;          
                                          4   font-size: 30px;       
       4   margin: 0px;                   5   margin: 0;             
       5   padding: 0px;                  6   padding: 0;            
       6   margin-bottom: 15px;                                      
       7   text-align: center;            7   text-align: center;    
       8 }                                8 }                        
       9 #input, #button {                9 #input, #button {        
      10   width: 350px;                 10   width: 400px;          
      11   height: 40px;                 11   height: 40px;          
                                         12   font-size: 30px;       
      12   margin: 0px;                  13   margin: 0;             
      13   padding: 0px;                 14   padding: 0;            
      14   margin-bottom: 15px;                                      
      15   text-align: center;           15   text-align: center;    
      16 }                               16 }                        

Would switching the line numbers to be left-aligned look better?

$ ./icdiff --line-numbers <(cat tests/input-{4,4}.txt) <(cat tests/input-{5,5}.txt) --cols=70
/dev/fd/63                         /dev/fd/62                        
1        #input, #button {         1        #input, #button {        
2          width: 350px;           2          width: 400px;          
3          height: 40px;           3          height: 40px;          
                                   4          font-size: 30px;       
4          margin: 0px;            5          margin: 0;             
5          padding: 0px;           6          padding: 0;            
6          margin-bottom: 15px;                                      
7          text-align: center;     7          text-align: center;    
8        }                         8        }                        
9        #input, #button {         9        #input, #button {        
10         width: 350px;           10         width: 400px;          
11         height: 40px;           11         height: 40px;          
                                   12         font-size: 30px;       
12         margin: 0px;            13         margin: 0;             
13         padding: 0px;           14         padding: 0;            
14         margin-bottom: 15px;                                      
15         text-align: center;     15         text-align: center;    
16       }                         16       }                        

@babam86
Copy link
Author

babam86 commented Dec 23, 2017

Yes, but the texts should also be switched to the left.

@babam86
Copy link
Author

babam86 commented Dec 30, 2017

Or, if the text is wrapped then align to the beginning of the line.

1514550035910

@babam86 babam86 changed the title Feature Request: Align the line numbers with the file names that are compared. Feature Request: Align the line numbers to the filename/ if the text is wrapped then align to the beginning of the line. Jan 21, 2018
@babam86 babam86 closed this as completed Feb 9, 2018
@babam86 babam86 reopened this Feb 9, 2018
@babam86 babam86 closed this as completed Feb 9, 2018
@babam86 babam86 reopened this Feb 9, 2018
@babam86 babam86 changed the title Feature Request: Align the line numbers to the filename/ if the text is wrapped then align to the beginning of the line. Feature Request: Align the line numbers to the filename or if the text is wrapped then align to the beginning of the line. Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants