3

I have linum mode and whitespace mode enabled. This works great except that I want padding in linum mode (which uses a space) and so, instead of there being a space (or a different colored space as I would really like), there is a kind of annoying little dot. enter image description here Is there a way to fix this (see photo):

My linum lines from init.el are attached. Thanks!

61·(defun·linum-format-func·(line)                                                                                                                            
162···(concat                                                                                                                                                  
163····(propertize·(format·linum-format-fmt·line)·'face·'linum)                                                                                                
164····(propertize·"·"·'face·'mode-line)))                                                                                                                     
165·                                                                                                                                                           
166·(unless·window-system                                                                                                                                      
167···(setq·linum-format·'linum-format-func))                                                                                                                  
168·                                                                                                                                                           
169·(add-hook·'linum-before-numbering-hook·'my-linum-get-format-string)                                                                                        
170·                                                                                                                                                           
171·(defun·my-linum-get-format-string·()                                                                                                                       
172···(let*·((width·(length·(number-to-string                                                                                                                  
173··························(count-lines·(point-min)·(point-max)))))                                                                                          
174··········(format·(concat·"%"·(number-to-string·width)·"d")))                                                                                               
175·····(setq·my-linum-format-string·format)))                                                                                                                 
176·                                                                                                                                                           
177·(setq·linum-format·"%d·") 
  • 1
    One alternative would be to use the window fringe as a separator instead of a space between the line number and the text, and eliminate the space at line 177 in your example for linum-format. The width and color of the window fringe can be adjusted. My recollection is that I have posted either comments or answers regarding this issue in the past in at least a couple of related threads. – lawlist Oct 1 '15 at 7:46

Your Answer

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

Browse other questions tagged or ask your own question.